home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 May: Tool Chest / Dev.CD May 00 TC.toast / pc / tool chest / macapp / macapp r14d5 / install macapp r14d5 / Apple Frameworks / WASTE / Source / WEStylers.c < prev    next >
MacBinary  |  2000-02-25  |  14.3 KB  |  [TEXT/CWIE]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Fri Feb 25 05:00:00 2000, modified Fri Feb 25 05:00:00 2000, creator 'CWIE', type ASCII, 13975 bytes "WEStylers.c" , at 0x3717 286 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[CWIE]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0b 57 45 53 74 79 6c | 65 72 73 2e 63 00 00 00 |..WEStyl|ers.c...|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 43 57 49 | 45 00 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 36 97 00 | 00 01 1e b4 dc 03 20 b4 |.....6..|...... .|
|00000060| dc 03 20 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.. .....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 36 46 00 00 |........|....6F..|
|00000080| 2f 2a 0d 20 2a 09 57 45 | 53 74 79 6c 65 72 73 2e |/*. *.WE|Stylers.|
|00000090| 63 0d 20 2a 0d 20 2a 09 | 57 41 53 54 45 20 50 52 |c. *. *.|WASTE PR|
|000000a0| 4f 4a 45 43 54 0d 20 2a | 20 20 53 74 79 6c 65 20 |OJECT. *| Style |
|000000b0| 6f 62 6a 65 63 74 73 0d | 20 2a 0d 20 2a 20 20 43 |objects.| *. * C|
|000000c0| 6f 70 79 72 69 67 68 74 | 20 28 63 29 20 31 39 39 |opyright| (c) 199|
|000000d0| 33 2d 31 39 39 38 20 4d | 61 72 63 6f 20 50 69 6f |3-1998 M|arco Pio|
|000000e0| 76 61 6e 65 6c 6c 69 0d | 20 2a 09 41 6c 6c 20 52 |vanelli.| *.All R|
|000000f0| 69 67 68 74 73 20 52 65 | 73 65 72 76 65 64 0d 20 |ights Re|served. |
|00000100| 2a 0d 20 2a 20 20 43 20 | 70 6f 72 74 20 62 79 20 |*. * C |port by |
|00000110| 44 61 6e 20 43 72 65 76 | 69 65 72 0d 20 2a 0d 20 |Dan Crev|ier. *. |
|00000120| 2a 2f 0d 0d 2f 2a 0d 09 | 43 6f 70 79 72 69 67 68 |*/../*..|Copyrigh|
|00000130| 74 20 a9 20 31 39 39 38 | 2d 31 39 39 39 20 62 79 |t . 1998|-1999 by|
|00000140| 20 41 70 70 6c 65 20 43 | 6f 6d 70 75 74 65 72 2c | Apple C|omputer,|
|00000150| 20 49 6e 63 2e 20 41 6c | 6c 20 72 69 67 68 74 73 | Inc. Al|l rights|
|00000160| 20 72 65 73 65 72 76 65 | 64 2e 0d 0d 09 50 6f 72 | reserve|d....Por|
|00000170| 74 69 6f 6e 73 20 62 61 | 73 65 64 20 6f 6e 20 57 |tions ba|sed on W|
|00000180| 41 53 54 45 3a 0d 09 43 | 6f 70 79 72 69 67 68 74 |ASTE:..C|opyright|
|00000190| 20 28 63 29 20 31 39 39 | 33 2d 31 39 39 38 20 4d | (c) 199|3-1998 M|
|000001a0| 61 72 63 6f 20 50 69 6f | 76 61 6e 65 6c 6c 69 2e |arco Pio|vanelli.|
|000001b0| 20 0d 09 41 6c 6c 20 52 | 69 67 68 74 73 20 52 65 | ..All R|ights Re|
|000001c0| 73 65 72 76 65 64 0d 0d | 09 43 68 61 6e 67 65 20 |served..|.Change |
|000001d0| 48 69 73 74 6f 72 79 3a | 0d 09 09 31 32 2f 30 39 |History:|...12/09|
|000001e0| 2f 39 39 09 54 57 42 09 | 09 43 6f 73 6d 65 74 69 |/99.TWB.|.Cosmeti|
|000001f0| 63 2e 20 0d 09 09 31 31 | 2f 32 32 2f 39 39 09 54 |c. ...11|/22/99.T|
|00000200| 57 42 09 09 41 6c 6c 6f | 77 20 62 6f 74 68 20 73 |WB..Allo|w both s|
|00000210| 74 79 6c 65 72 73 20 61 | 6e 64 20 6f 62 6a 65 63 |tylers a|nd objec|
|00000220| 74 73 20 74 6f 20 64 72 | 61 77 2e 20 0d 09 09 31 |ts to dr|aw. ...1|
|00000230| 31 2f 31 37 2f 39 39 09 | 54 57 42 09 09 53 74 72 |1/17/99.|TWB..Str|
|00000240| 65 61 6d 69 6e 67 20 73 | 75 70 70 6f 72 74 20 66 |eaming s|upport f|
|00000250| 6f 72 20 73 74 79 6c 65 | 72 73 2e 20 0d 09 09 09 |or style|rs. ....|
|00000260| 09 09 09 09 52 65 6e 61 | 6d 65 20 73 74 79 6c 65 |....Rena|me style|
|00000270| 72 20 70 72 6f 63 73 20 | 66 6f 72 20 63 6c 61 72 |r procs |for clar|
|00000280| 69 74 79 2e 20 0d 09 09 | 31 31 2f 31 35 2f 39 39 |ity. ...|11/15/99|
|00000290| 09 54 57 42 09 09 41 64 | 64 20 73 74 79 6c 65 72 |.TWB..Ad|d styler|
|000002a0| 73 2e 20 0d 2a 2f 0d 0d | 0d 23 69 6e 63 6c 75 64 |s. .*/..|.#includ|
|000002b0| 65 20 22 57 41 53 54 45 | 49 6e 74 66 2e 68 22 0d |e "WASTE|Intf.h".|
|000002c0| 0d 23 69 66 20 57 41 53 | 54 45 5f 53 54 59 4c 45 |.#if WAS|TE_STYLE|
|000002d0| 52 53 0d 0d 2f 2f 20 73 | 74 61 74 69 63 20 76 61 |RS..// s|tatic va|
|000002e0| 72 69 61 62 6c 65 73 0d | 0d 73 74 61 74 69 63 20 |riables.|.static |
|000002f0| 57 45 53 74 79 6c 65 72 | 48 61 6e 64 6c 65 72 54 |WEStyler|HandlerT|
|00000300| 61 62 6c 65 20 5f 77 65 | 53 74 79 6c 65 72 48 61 |able _we|StylerHa|
|00000310| 6e 64 6c 65 72 54 61 62 | 6c 65 3b 0d 0d 0d 0d 70 |ndlerTab|le;....p|
|00000320| 61 73 63 61 6c 20 46 6c | 61 76 6f 72 54 79 70 65 |ascal Fl|avorType|
|00000330| 20 57 45 47 65 74 53 74 | 79 6c 65 72 54 79 70 65 | WEGetSt|ylerType|
|00000340| 28 57 45 53 74 79 6c 65 | 72 52 65 66 65 72 65 6e |(WEStyle|rReferen|
|00000350| 63 65 20 73 74 79 6c 65 | 72 29 0d 7b 0d 09 72 65 |ce style|r).{..re|
|00000360| 74 75 72 6e 20 28 2a 73 | 74 79 6c 65 72 29 2d 3e |turn (*s|tyler)->|
|00000370| 73 74 79 6c 65 72 54 79 | 70 65 3b 0d 7d 0d 0d 70 |stylerTy|pe;.}..p|
|00000380| 61 73 63 61 6c 20 48 61 | 6e 64 6c 65 20 57 45 47 |ascal Ha|ndle WEG|
|00000390| 65 74 53 74 79 6c 65 72 | 44 61 74 61 48 61 6e 64 |etStyler|DataHand|
|000003a0| 6c 65 28 57 45 53 74 79 | 6c 65 72 52 65 66 65 72 |le(WESty|lerRefer|
|000003b0| 65 6e 63 65 20 73 74 79 | 6c 65 72 29 0d 7b 0d 09 |ence sty|ler).{..|
|000003c0| 72 65 74 75 72 6e 20 28 | 2a 73 74 79 6c 65 72 29 |return (|*styler)|
|000003d0| 2d 3e 73 74 79 6c 65 72 | 44 61 74 61 48 61 6e 64 |->styler|DataHand|
|000003e0| 6c 65 3b 0d 7d 0d 0d 70 | 61 73 63 61 6c 20 57 45 |le;.}..p|ascal WE|
|000003f0| 48 61 6e 64 6c 65 20 57 | 45 47 65 74 53 74 79 6c |Handle W|EGetStyl|
|00000400| 65 72 4f 77 6e 65 72 28 | 57 45 53 74 79 6c 65 72 |erOwner(|WEStyler|
|00000410| 52 65 66 65 72 65 6e 63 | 65 20 73 74 79 6c 65 72 |Referenc|e styler|
|00000420| 29 0d 7b 0d 09 72 65 74 | 75 72 6e 20 28 2a 73 74 |).{..ret|urn (*st|
|00000430| 79 6c 65 72 29 2d 3e 73 | 74 79 6c 65 72 4f 77 6e |yler)->s|tylerOwn|
|00000440| 65 72 3b 0d 7d 0d 0d 70 | 61 73 63 61 6c 20 53 49 |er;.}..p|ascal SI|
|00000450| 6e 74 33 32 20 57 45 47 | 65 74 53 74 79 6c 65 72 |nt32 WEG|etStyler|
|00000460| 52 65 66 43 6f 6e 28 57 | 45 53 74 79 6c 65 72 52 |RefCon(W|EStylerR|
|00000470| 65 66 65 72 65 6e 63 65 | 20 73 74 79 6c 65 72 29 |eference| styler)|
|00000480| 0d 7b 0d 09 72 65 74 75 | 72 6e 20 28 2a 73 74 79 |.{..retu|rn (*sty|
|00000490| 6c 65 72 29 2d 3e 73 74 | 79 6c 65 72 52 65 66 43 |ler)->st|ylerRefC|
|000004a0| 6f 6e 3b 0d 7d 0d 0d 70 | 61 73 63 61 6c 20 76 6f |on;.}..p|ascal vo|
|000004b0| 69 64 20 57 45 53 65 74 | 53 74 79 6c 65 72 52 65 |id WESet|StylerRe|
|000004c0| 66 43 6f 6e 28 57 45 53 | 74 79 6c 65 72 52 65 66 |fCon(WES|tylerRef|
|000004d0| 65 72 65 6e 63 65 20 73 | 74 79 6c 65 72 2c 20 53 |erence s|tyler, S|
|000004e0| 49 6e 74 33 32 20 73 74 | 79 6c 65 72 52 65 66 43 |Int32 st|ylerRefC|
|000004f0| 6f 6e 29 0d 7b 0d 09 28 | 2a 73 74 79 6c 65 72 29 |on).{..(|*styler)|
|00000500| 2d 3e 73 74 79 6c 65 72 | 52 65 66 43 6f 6e 20 3d |->styler|RefCon =|
|00000510| 20 73 74 79 6c 65 72 52 | 65 66 43 6f 6e 3b 0d 7d | stylerR|efCon;.}|
|00000520| 0d 0d 70 61 73 63 61 6c | 20 53 49 6e 74 33 32 20 |..pascal| SInt32 |
|00000530| 5f 57 45 4c 6f 6f 6b 75 | 70 53 74 79 6c 65 72 54 |_WELooku|pStylerT|
|00000540| 79 70 65 28 46 6c 61 76 | 6f 72 54 79 70 65 20 73 |ype(Flav|orType s|
|00000550| 74 79 6c 65 72 54 79 70 | 65 29 0d 7b 0d 09 2f 2f |tylerTyp|e).{..//|
|00000560| 20 6c 6f 6f 6b 20 66 6f | 72 20 61 20 57 45 53 74 | look fo|r a WESt|
|00000570| 79 6c 65 72 48 61 6e 64 | 6c 65 72 45 6e 74 72 79 |ylerHand|lerEntry|
|00000580| 20 72 65 63 6f 72 64 20 | 66 6f 72 20 74 68 65 20 | record |for the |
|00000590| 73 70 65 63 69 66 69 65 | 64 20 73 74 79 6c 65 72 |specifie|d styler|
|000005a0| 20 6b 69 6e 64 0d 09 2f | 2f 20 69 6e 20 74 68 65 | kind../|/ in the|
|000005b0| 20 67 69 76 65 6e 20 73 | 74 79 6c 65 72 20 74 61 | given s|tyler ta|
|000005c0| 62 6c 65 0d 0d 09 53 49 | 6e 74 33 32 20 6e 45 6e |ble...SI|nt32 nEn|
|000005d0| 74 72 69 65 73 2c 20 69 | 6e 64 65 78 3b 0d 09 57 |tries, i|ndex;..W|
|000005e0| 45 53 74 79 6c 65 72 48 | 61 6e 64 6c 65 72 45 6e |EStylerH|andlerEn|
|000005f0| 74 72 79 20 2a 70 54 61 | 62 6c 65 3b 0d 0d 09 2f |try *pTa|ble;.../|
|00000600| 2f 20 64 6f 20 6e 6f 74 | 68 69 6e 67 20 69 66 20 |/ do not|hing if |
|00000610| 74 68 65 20 53 74 79 6c | 65 20 48 61 6e 64 6c 65 |the Styl|e Handle|
|00000620| 72 20 54 61 62 6c 65 20 | 68 61 73 20 6e 6f 74 20 |r Table |has not |
|00000630| 62 65 65 6e 20 69 6e 69 | 74 65 64 20 79 65 74 0d |been ini|ted yet.|
|00000640| 09 69 66 20 28 5f 77 65 | 53 74 79 6c 65 72 48 61 |.if (_we|StylerHa|
|00000650| 6e 64 6c 65 72 54 61 62 | 6c 65 20 3d 3d 20 6e 69 |ndlerTab|le == ni|
|00000660| 6c 29 0d 09 7b 0d 09 09 | 72 65 74 75 72 6e 20 6b |l)..{...|return k|
|00000670| 55 6e 6b 6e 6f 77 6e 4f | 62 6a 65 63 74 54 79 70 |UnknownO|bjectTyp|
|00000680| 65 3b 0d 09 7d 0d 0d 09 | 2f 2f 20 63 61 6c 63 75 |e;..}...|// calcu|
|00000690| 6c 61 74 65 20 65 6e 74 | 72 79 20 63 6f 75 6e 74 |late ent|ry count|
|000006a0| 0d 09 6e 45 6e 74 72 69 | 65 73 20 3d 20 47 65 74 |..nEntri|es = Get|
|000006b0| 48 61 6e 64 6c 65 53 69 | 7a 65 28 28 48 61 6e 64 |HandleSi|ze((Hand|
|000006c0| 6c 65 29 20 5f 77 65 53 | 74 79 6c 65 72 48 61 6e |le) _weS|tylerHan|
|000006d0| 64 6c 65 72 54 61 62 6c | 65 29 20 2f 20 73 69 7a |dlerTabl|e) / siz|
|000006e0| 65 6f 66 28 57 45 53 74 | 79 6c 65 72 48 61 6e 64 |eof(WESt|ylerHand|
|000006f0| 6c 65 72 45 6e 74 72 79 | 29 3b 0d 0d 09 2f 2f 20 |lerEntry|);...// |
|00000700| 73 63 61 6e 20 74 68 65 | 20 53 74 79 6c 65 20 48 |scan the| Style H|
|00000710| 61 6e 64 6c 65 72 20 54 | 61 62 6c 65 20 6c 6f 6f |andler T|able loo|
|00000720| 6b 69 6e 67 20 66 6f 72 | 20 61 20 74 79 70 65 20 |king for| a type |
|00000730| 6d 61 74 63 68 0d 09 70 | 54 61 62 6c 65 20 3d 20 |match..p|Table = |
|00000740| 2a 5f 77 65 53 74 79 6c | 65 72 48 61 6e 64 6c 65 |*_weStyl|erHandle|
|00000750| 72 54 61 62 6c 65 3b 0d | 09 66 6f 72 20 28 20 69 |rTable;.|.for ( i|
|00000760| 6e 64 65 78 20 3d 20 30 | 3b 20 69 6e 64 65 78 20 |ndex = 0|; index |
|00000770| 3c 20 6e 45 6e 74 72 69 | 65 73 3b 20 69 6e 64 65 |< nEntri|es; inde|
|00000780| 78 2b 2b 20 29 0d 09 7b | 0d 09 09 69 66 20 28 70 |x++ )..{|...if (p|
|00000790| 54 61 62 6c 65 2d 3e 73 | 74 79 6c 65 72 54 79 70 |Table->s|tylerTyp|
|000007a0| 65 20 3d 3d 20 73 74 79 | 6c 65 72 54 79 70 65 29 |e == sty|lerType)|
|000007b0| 0d 09 09 7b 0d 09 09 09 | 72 65 74 75 72 6e 20 69 |...{....|return i|
|000007c0| 6e 64 65 78 3b 0d 09 09 | 7d 0d 09 09 70 54 61 62 |ndex;...|}...pTab|
|000007d0| 6c 65 2b 2b 3b 0d 09 7d | 0d 0d 09 72 65 74 75 72 |le++;..}|...retur|
|000007e0| 6e 20 6b 55 6e 6b 6e 6f | 77 6e 4f 62 6a 65 63 74 |n kUnkno|wnObject|
|000007f0| 54 79 70 65 3b 0d 7d 0d | 0d 70 61 73 63 61 6c 20 |Type;.}.|.pascal |
|00000800| 4f 53 45 72 72 20 5f 57 | 45 47 65 74 49 6e 64 53 |OSErr _W|EGetIndS|
|00000810| 74 79 6c 65 72 54 79 70 | 65 28 53 49 6e 74 33 32 |tylerTyp|e(SInt32|
|00000820| 20 69 6e 64 65 78 2c 20 | 46 6c 61 76 6f 72 54 79 | index, |FlavorTy|
|00000830| 70 65 20 2a 73 74 79 6c | 65 72 54 79 70 65 29 0d |pe *styl|erType).|
|00000840| 7b 0d 09 53 49 6e 74 33 | 32 20 6e 45 6e 74 72 69 |{..SInt3|2 nEntri|
|00000850| 65 73 3b 0d 0d 09 2a 73 | 74 79 6c 65 72 54 79 70 |es;...*s|tylerTyp|
|00000860| 65 20 3d 20 30 4c 3b 0d | 0d 09 2f 2f 20 69 6e 64 |e = 0L;.|..// ind|
|00000870| 65 78 20 6d 75 73 74 20 | 62 65 20 6e 6f 6e 2d 6e |ex must |be non-n|
|00000880| 65 67 61 74 69 76 65 0d | 09 69 66 20 28 69 6e 64 |egative.|.if (ind|
|00000890| 65 78 20 3c 20 30 29 0d | 09 7b 0d 09 09 72 65 74 |ex < 0).|.{...ret|
|000008a0| 75 72 6e 20 77 65 55 6e | 6b 6e 6f 77 6e 4f 62 6a |urn weUn|knownObj|
|000008b0| 65 63 74 54 79 70 65 45 | 72 72 3b 0d 09 7d 0d 0d |ectTypeE|rr;..}..|
|000008c0| 09 2f 2f 20 63 61 6c 63 | 75 6c 61 74 65 20 6e 75 |.// calc|ulate nu|
|000008d0| 6d 62 65 72 20 6f 66 20 | 65 6e 74 72 69 65 73 20 |mber of |entries |
|000008e0| 69 6e 20 74 68 65 20 67 | 6c 6f 62 61 6c 20 68 61 |in the g|lobal ha|
|000008f0| 6e 64 6c 65 72 20 74 61 | 62 6c 65 0d 09 6e 45 6e |ndler ta|ble..nEn|
|00000900| 74 72 69 65 73 20 3d 20 | 30 3b 0d 09 69 66 20 28 |tries = |0;..if (|
|00000910| 5f 77 65 53 74 79 6c 65 | 72 48 61 6e 64 6c 65 72 |_weStyle|rHandler|
|00000920| 54 61 62 6c 65 20 21 3d | 20 6e 69 6c 29 0d 09 7b |Table !=| nil)..{|
|00000930| 0d 09 09 6e 45 6e 74 72 | 69 65 73 20 3d 20 47 65 |...nEntr|ies = Ge|
|00000940| 74 48 61 6e 64 6c 65 53 | 69 7a 65 28 28 48 61 6e |tHandleS|ize((Han|
|00000950| 64 6c 65 29 20 5f 77 65 | 53 74 79 6c 65 72 48 61 |dle) _we|StylerHa|
|00000960| 6e 64 6c 65 72 54 61 62 | 6c 65 29 20 2f 20 73 69 |ndlerTab|le) / si|
|00000970| 7a 65 6f 66 28 57 45 53 | 74 79 6c 65 72 48 61 6e |zeof(WES|tylerHan|
|00000980| 64 6c 65 72 45 6e 74 72 | 79 29 3b 0d 09 7d 0d 0d |dlerEntr|y);..}..|
|00000990| 09 2f 2f 20 72 65 74 75 | 72 6e 20 61 6e 20 65 72 |.// retu|rn an er|
|000009a0| 72 6f 72 20 63 6f 64 65 | 20 69 66 20 69 6e 64 65 |ror code| if inde|
|000009b0| 78 20 69 73 20 74 6f 6f | 20 6c 61 72 67 65 0d 09 |x is too| large..|
|000009c0| 69 66 20 28 69 6e 64 65 | 78 20 3e 3d 20 6e 45 6e |if (inde|x >= nEn|
|000009d0| 74 72 69 65 73 29 0d 09 | 7b 0d 09 09 72 65 74 75 |tries)..|{...retu|
|000009e0| 72 6e 20 77 65 55 6e 6b | 6e 6f 77 6e 4f 62 6a 65 |rn weUnk|nownObje|
|000009f0| 63 74 54 79 70 65 45 72 | 72 3b 0d 09 7d 0d 0d 09 |ctTypeEr|r;..}...|
|00000a00| 2a 73 74 79 6c 65 72 54 | 79 70 65 20 3d 20 28 2a |*stylerT|ype = (*|
|00000a10| 5f 77 65 53 74 79 6c 65 | 72 48 61 6e 64 6c 65 72 |_weStyle|rHandler|
|00000a20| 54 61 62 6c 65 29 5b 69 | 6e 64 65 78 5d 2e 73 74 |Table)[i|ndex].st|
|00000a30| 79 6c 65 72 54 79 70 65 | 3b 0d 0d 09 72 65 74 75 |ylerType|;...retu|
|00000a40| 72 6e 20 6e 6f 45 72 72 | 3b 0d 7d 0d 0d 70 61 73 |rn noErr|;.}..pas|
|00000a50| 63 61 6c 20 4f 53 45 72 | 72 20 57 45 4e 65 77 53 |cal OSEr|r WENewS|
|00000a60| 74 79 6c 65 72 28 46 6c | 61 76 6f 72 54 79 70 65 |tyler(Fl|avorType|
|00000a70| 20 73 74 79 6c 65 72 54 | 79 70 65 2c 20 48 61 6e | stylerT|ype, Han|
|00000a80| 64 6c 65 20 73 74 79 6c | 65 72 44 61 74 61 48 61 |dle styl|erDataHa|
|00000a90| 6e 64 6c 65 2c 20 57 45 | 48 61 6e 64 6c 65 20 68 |ndle, WE|Handle h|
|00000aa0| 57 45 2c 0d 09 09 09 09 | 09 09 20 57 45 53 74 79 |WE,.....|.. WESty|
|00000ab0| 6c 65 72 52 65 66 65 72 | 65 6e 63 65 20 2a 73 74 |lerRefer|ence *st|
|00000ac0| 79 6c 65 72 29 0d 7b 0d | 09 53 49 6e 74 33 32 20 |yler).{.|.SInt32 |
|00000ad0| 69 6e 64 65 78 3b 0d 09 | 4f 53 45 72 72 20 65 72 |index;..|OSErr er|
|00000ae0| 72 20 3d 20 6e 6f 45 72 | 72 3b 0d 0d 09 2a 73 74 |r = noEr|r;...*st|
|00000af0| 79 6c 65 72 20 3d 20 6e | 69 6c 3b 0d 0d 09 2f 2f |yler = n|il;...//|
|00000b00| 20 6c 6f 6f 6b 20 75 70 | 20 74 68 65 20 73 70 65 | look up| the spe|
|00000b10| 63 69 66 69 65 64 20 73 | 74 79 6c 65 72 20 74 79 |cified s|tyler ty|
|00000b20| 70 65 20 69 6e 20 74 68 | 65 20 67 6c 6f 62 61 6c |pe in th|e global|
|00000b30| 20 68 61 6e 64 6c 65 72 | 20 74 61 62 6c 65 0d 09 | handler| table..|
|00000b40| 69 6e 64 65 78 20 3d 20 | 5f 57 45 4c 6f 6f 6b 75 |index = |_WELooku|
|00000b50| 70 53 74 79 6c 65 72 54 | 79 70 65 28 73 74 79 6c |pStylerT|ype(styl|
|00000b60| 65 72 54 79 70 65 29 3b | 0d 09 69 66 20 28 69 6e |erType);|..if (in|
|00000b70| 64 65 78 20 3d 3d 20 6b | 55 6e 6b 6e 6f 77 6e 4f |dex == k|UnknownO|
|00000b80| 62 6a 65 63 74 54 79 70 | 65 29 0d 09 7b 0d 09 09 |bjectTyp|e)..{...|
|00000b90| 65 72 72 20 3d 20 77 65 | 55 6e 6b 6e 6f 77 6e 4f |err = we|UnknownO|
|00000ba0| 62 6a 65 63 74 54 79 70 | 65 45 72 72 3b 0d 09 09 |bjectTyp|eErr;...|
|00000bb0| 67 6f 74 6f 20 62 61 69 | 6c 3b 0d 09 7d 0d 0d 09 |goto bai|l;..}...|
|00000bc0| 2f 2f 20 63 72 65 61 74 | 65 20 61 20 6e 65 77 20 |// creat|e a new |
|00000bd0| 72 65 6c 6f 63 61 74 61 | 62 6c 65 20 62 6c 6f 63 |relocata|ble bloc|
|00000be0| 6b 20 74 6f 20 68 6f 6c | 64 20 74 68 65 20 73 74 |k to hol|d the st|
|00000bf0| 79 6c 65 72 20 64 65 73 | 63 72 69 70 74 6f 72 0d |yler des|criptor.|
|00000c00| 09 65 72 72 20 3d 20 5f | 57 45 41 6c 6c 6f 63 61 |.err = _|WEAlloca|
|00000c10| 74 65 28 73 69 7a 65 6f | 66 28 57 45 53 74 79 6c |te(sizeo|f(WEStyl|
|00000c20| 65 72 29 2c 20 6b 41 6c | 6c 6f 63 43 6c 65 61 72 |er), kAl|locClear|
|00000c30| 2c 20 28 48 61 6e 64 6c | 65 20 2a 29 73 74 79 6c |, (Handl|e *)styl|
|00000c40| 65 72 29 3b 0d 09 69 66 | 20 28 65 72 72 20 21 3d |er);..if| (err !=|
|00000c50| 20 6e 6f 45 72 72 29 0d | 09 09 67 6f 74 6f 20 62 | noErr).|..goto b|
|00000c60| 61 69 6c 3b 0d 0d 09 2f | 2f 20 66 69 6c 6c 20 69 |ail;.../|/ fill i|
|00000c70| 6e 20 74 68 65 20 73 74 | 79 6c 65 72 20 64 65 73 |n the st|yler des|
|00000c80| 63 72 69 70 74 6f 72 0d | 09 7b 0d 09 09 57 45 53 |criptor.|.{...WES|
|00000c90| 74 79 6c 65 72 20 2a 70 | 44 65 73 63 20 3d 20 2a |tyler *p|Desc = *|
|00000ca0| 2a 73 74 79 6c 65 72 3b | 0d 0d 09 09 70 44 65 73 |*styler;|....pDes|
|00000cb0| 63 2d 3e 73 74 79 6c 65 | 72 54 79 70 65 20 3d 20 |c->style|rType = |
|00000cc0| 73 74 79 6c 65 72 54 79 | 70 65 3b 0d 09 09 70 44 |stylerTy|pe;...pD|
|00000cd0| 65 73 63 2d 3e 73 74 79 | 6c 65 72 4f 77 6e 65 72 |esc->sty|lerOwner|
|00000ce0| 20 3d 20 68 57 45 3b 0d | 09 09 70 44 65 73 63 2d | = hWE;.|..pDesc-|
|00000cf0| 3e 73 74 79 6c 65 72 52 | 65 66 43 6f 6e 20 3d 20 |>stylerR|efCon = |
|00000d00| 30 3b 0d 09 09 70 44 65 | 73 63 2d 3e 73 74 79 6c |0;...pDe|sc->styl|
|00000d10| 65 72 44 61 74 61 48 61 | 6e 64 6c 65 20 3d 20 73 |erDataHa|ndle = s|
|00000d20| 74 79 6c 65 72 44 61 74 | 61 48 61 6e 64 6c 65 3b |tylerDat|aHandle;|
|00000d30| 0d 09 09 70 44 65 73 63 | 2d 3e 73 74 79 6c 65 72 |...pDesc|->styler|
|00000d40| 49 6e 64 65 78 20 3d 20 | 69 6e 64 65 78 3b 0d 09 |Index = |index;..|
|00000d50| 7d 0d 0d 09 2f 2f 20 41 | 64 64 20 74 68 65 20 73 |}...// A|dd the s|
|00000d60| 74 79 6c 65 72 20 74 6f | 20 69 74 73 20 6f 77 6e |tyler to| its own|
|00000d70| 65 72 20 74 61 62 6c 65 | 0d 09 5f 57 45 49 6e 73 |er table|.._WEIns|
|00000d80| 65 72 74 53 74 79 6c 65 | 72 28 2a 73 74 79 6c 65 |ertStyle|r(*style|
|00000d90| 72 29 3b 0d 0d 09 2f 2f | 20 47 69 76 65 20 74 68 |r);...//| Give th|
|00000da0| 65 20 73 74 79 6c 65 72 | 20 61 20 63 68 61 6e 63 |e styler| a chanc|
|00000db0| 65 20 74 6f 20 69 6e 69 | 74 69 61 6c 69 7a 65 20 |e to ini|tialize |
|00000dc0| 69 74 73 65 6c 66 0d 09 | 69 66 20 28 5f 77 65 53 |itself..|if (_weS|
|00000dd0| 74 79 6c 65 72 48 61 6e | 64 6c 65 72 54 61 62 6c |tylerHan|dlerTabl|
|00000de0| 65 20 21 3d 20 6e 69 6c | 29 0d 09 7b 0d 09 09 57 |e != nil|)..{...W|
|00000df0| 45 53 74 79 6c 65 72 4e | 65 77 55 50 50 20 73 74 |EStylerN|ewUPP st|
|00000e00| 79 6c 65 72 4e 65 77 20 | 3d 20 28 2a 5f 77 65 53 |ylerNew |= (*_weS|
|00000e10| 74 79 6c 65 72 48 61 6e | 64 6c 65 72 54 61 62 6c |tylerHan|dlerTabl|
|00000e20| 65 29 5b 69 6e 64 65 78 | 5d 2e 73 74 79 6c 65 72 |e)[index|].styler|
|00000e30| 4e 65 77 3b 0d 0d 09 09 | 2f 2f 20 63 61 6c 6c 20 |New;....|// call |
|00000e40| 74 68 65 20 6e 65 77 20 | 68 61 6e 64 6c 65 72 2c |the new |handler,|
|00000e50| 20 69 66 20 61 6e 79 0d | 09 09 69 66 20 28 73 74 | if any.|..if (st|
|00000e60| 79 6c 65 72 4e 65 77 20 | 21 3d 20 6e 69 6c 29 0d |ylerNew |!= nil).|
|00000e70| 09 09 7b 0d 09 09 09 65 | 72 72 20 3d 20 43 61 6c |..{....e|rr = Cal|
|00000e80| 6c 57 45 53 74 79 6c 65 | 72 4e 65 77 50 72 6f 63 |lWEStyle|rNewProc|
|00000e90| 28 2a 73 74 79 6c 65 72 | 2c 20 73 74 79 6c 65 72 |(*styler|, styler|
|00000ea0| 4e 65 77 29 3b 0d 09 09 | 7d 0d 09 7d 0d 0d 62 61 |New);...|}..}..ba|
|00000eb0| 69 6c 3a 0d 09 72 65 74 | 75 72 6e 20 65 72 72 3b |il:..ret|urn err;|
|00000ec0| 0d 7d 0d 0d 70 61 73 63 | 61 6c 20 4f 53 45 72 72 |.}..pasc|al OSErr|
|00000ed0| 20 57 45 44 69 73 70 6f | 73 65 53 74 79 6c 65 72 | WEDispo|seStyler|
|00000ee0| 28 57 45 53 74 79 6c 65 | 72 52 65 66 65 72 65 6e |(WEStyle|rReferen|
|00000ef0| 63 65 20 73 74 79 6c 65 | 72 29 0d 7b 0d 09 57 45 |ce style|r).{..WE|
|00000f00| 53 74 79 6c 65 72 20 2a | 70 44 65 73 63 3b 0d 09 |Styler *|pDesc;..|
|00000f10| 4f 53 45 72 72 20 65 72 | 72 20 3d 20 6e 6f 45 72 |OSErr er|r = noEr|
|00000f20| 72 3b 0d 0d 09 2f 2f 20 | 73 61 6e 69 74 79 20 63 |r;...// |sanity c|
|00000f30| 68 65 63 6b 3a 20 64 6f | 20 6e 6f 74 68 69 6e 67 |heck: do| nothing|
|00000f40| 20 69 66 20 77 65 20 68 | 61 76 65 20 61 20 6e 75 | if we h|ave a nu|
|00000f50| 6c 6c 20 64 65 73 63 72 | 69 70 74 6f 72 20 68 61 |ll descr|iptor ha|
|00000f60| 6e 64 6c 65 0d 09 69 66 | 20 28 73 74 79 6c 65 72 |ndle..if| (styler|
|00000f70| 20 3d 3d 20 6e 69 6c 29 | 0d 09 7b 0d 09 09 72 65 | == nil)|..{...re|
|00000f80| 74 75 72 6e 20 6e 69 6c | 48 61 6e 64 6c 65 45 72 |turn nil|HandleEr|
|00000f90| 72 3b 0d 09 7d 0d 0d 09 | 2f 2f 20 52 65 6d 6f 76 |r;..}...|// Remov|
|00000fa0| 65 20 74 68 65 20 73 74 | 79 6c 65 72 20 66 72 6f |e the st|yler fro|
|00000fb0| 6d 20 69 74 73 20 6f 77 | 6e 65 72 20 74 61 62 6c |m its ow|ner tabl|
|00000fc0| 65 0d 09 5f 57 45 52 65 | 6d 6f 76 65 53 74 79 6c |e.._WERe|moveStyl|
|00000fd0| 65 72 28 73 74 79 6c 65 | 72 29 3b 0d 0d 09 2f 2f |er(style|r);...//|
|00000fe0| 20 6c 6f 63 6b 20 74 68 | 65 20 64 65 73 63 72 69 | lock th|e descri|
|00000ff0| 70 74 6f 72 20 72 65 63 | 6f 72 64 0d 09 48 4c 6f |ptor rec|ord..HLo|
|00001000| 63 6b 28 28 48 61 6e 64 | 6c 65 29 73 74 79 6c 65 |ck((Hand|le)style|
|00001010| 72 29 3b 0d 09 70 44 65 | 73 63 20 3d 20 2a 73 74 |r);..pDe|sc = *st|
|00001020| 79 6c 65 72 3b 0d 0d 09 | 69 66 20 28 5f 77 65 53 |yler;...|if (_weS|
|00001030| 74 79 6c 65 72 48 61 6e | 64 6c 65 72 54 61 62 6c |tylerHan|dlerTabl|
|00001040| 65 20 21 3d 20 6e 69 6c | 29 0d 09 7b 0d 09 09 57 |e != nil|)..{...W|
|00001050| 45 53 74 79 6c 65 72 44 | 69 73 70 6f 73 65 55 50 |EStylerD|isposeUP|
|00001060| 50 20 73 74 79 6c 65 72 | 44 69 73 70 6f 73 65 20 |P styler|Dispose |
|00001070| 3d 20 28 2a 5f 77 65 53 | 74 79 6c 65 72 48 61 6e |= (*_weS|tylerHan|
|00001080| 64 6c 65 72 54 61 62 6c | 65 29 5b 70 44 65 73 63 |dlerTabl|e)[pDesc|
|00001090| 2d 3e 73 74 79 6c 65 72 | 49 6e 64 65 78 5d 2e 73 |->styler|Index].s|
|000010a0| 74 79 6c 65 72 44 69 73 | 70 6f 73 65 3b 0d 0d 09 |tylerDis|pose;...|
|000010b0| 09 2f 2f 20 63 61 6c 6c | 20 74 68 65 20 64 69 73 |.// call| the dis|
|000010c0| 70 6f 73 65 20 68 61 6e | 64 6c 65 72 2c 20 69 66 |pose han|dler, if|
|000010d0| 20 61 6e 79 0d 09 09 69 | 66 20 28 73 74 79 6c 65 | any...i|f (style|
|000010e0| 72 44 69 73 70 6f 73 65 | 20 21 3d 20 6e 69 6c 29 |rDispose| != nil)|
|000010f0| 0d 09 09 7b 0d 09 09 09 | 65 72 72 20 3d 20 43 61 |...{....|err = Ca|
|00001100| 6c 6c 57 45 53 74 79 6c | 65 72 44 69 73 70 6f 73 |llWEStyl|erDispos|
|00001110| 65 50 72 6f 63 28 73 74 | 79 6c 65 72 2c 20 73 74 |eProc(st|yler, st|
|00001120| 79 6c 65 72 44 69 73 70 | 6f 73 65 29 3b 0d 09 09 |ylerDisp|ose);...|
|00001130| 7d 0d 09 7d 0d 0d 09 2f | 2f 20 69 66 20 73 74 79 |}..}.../|/ if sty|
|00001140| 6c 65 72 20 6b 69 6e 64 | 20 69 73 20 75 6e 6b 6e |ler kind| is unkn|
|00001150| 6f 77 6e 20 6f 72 20 74 | 68 65 72 65 27 73 20 6e |own or t|here's n|
|00001160| 6f 20 63 75 73 74 6f 6d | 20 64 69 73 70 6f 73 65 |o custom| dispose|
|00001170| 20 68 61 6e 64 6c 65 72 | 2c 20 75 73 65 20 44 69 | handler|, use Di|
|00001180| 73 70 6f 73 65 48 61 6e | 64 6c 65 0d 09 5f 57 45 |sposeHan|dle.._WE|
|00001190| 46 6f 72 67 65 74 48 61 | 6e 64 6c 65 28 26 70 44 |ForgetHa|ndle(&pD|
|000011a0| 65 73 63 2d 3e 73 74 79 | 6c 65 72 44 61 74 61 48 |esc->sty|lerDataH|
|000011b0| 61 6e 64 6c 65 29 3b 0d | 0d 09 2f 2f 20 66 69 6e |andle);.|..// fin|
|000011c0| 61 6c 6c 79 2c 20 64 69 | 73 70 6f 73 65 20 6f 66 |ally, di|spose of|
|000011d0| 20 74 68 65 20 73 74 79 | 6c 65 72 20 64 65 73 63 | the sty|ler desc|
|000011e0| 72 69 70 74 6f 72 20 69 | 74 73 65 6c 66 0d 09 44 |riptor i|tself..D|
|000011f0| 69 73 70 6f 73 65 48 61 | 6e 64 6c 65 28 28 48 61 |isposeHa|ndle((Ha|
|00001200| 6e 64 6c 65 29 73 74 79 | 6c 65 72 29 3b 0d 0d 09 |ndle)sty|ler);...|
|00001210| 72 65 74 75 72 6e 20 65 | 72 72 3b 0d 7d 0d 0d 70 |return e|rr;.}..p|
|00001220| 61 73 63 61 6c 20 4f 53 | 45 72 72 20 5f 57 45 49 |ascal OS|Err _WEI|
|00001230| 6e 73 65 72 74 53 74 79 | 6c 65 72 28 57 45 53 74 |nsertSty|ler(WESt|
|00001240| 79 6c 65 72 52 65 66 65 | 72 65 6e 63 65 20 73 74 |ylerRefe|rence st|
|00001250| 79 6c 65 72 29 0d 7b 0d | 09 4f 53 45 72 72 20 65 |yler).{.|.OSErr e|
|00001260| 72 72 20 3d 20 6e 6f 45 | 72 72 3b 0d 0d 09 69 66 |rr = noE|rr;...if|
|00001270| 20 28 73 74 79 6c 65 72 | 29 0d 09 7b 0d 09 09 57 | (styler|)..{...W|
|00001280| 45 48 61 6e 64 6c 65 20 | 68 57 45 20 3d 20 57 45 |EHandle |hWE = WE|
|00001290| 47 65 74 53 74 79 6c 65 | 72 4f 77 6e 65 72 28 73 |GetStyle|rOwner(s|
|000012a0| 74 79 6c 65 72 29 3b 0d | 09 09 69 66 20 28 68 57 |tyler);.|..if (hW|
|000012b0| 45 29 0d 09 09 7b 0d 09 | 09 09 2f 2f 20 63 72 65 |E)...{..|..// cre|
|000012c0| 61 74 65 20 74 68 65 20 | 73 74 79 6c 65 72 20 74 |ate the |styler t|
|000012d0| 61 62 6c 65 2c 20 69 66 | 20 69 74 20 64 6f 65 73 |able, if| it does|
|000012e0| 6e 27 74 20 65 78 69 73 | 74 0d 09 09 09 57 45 53 |n't exis|t....WES|
|000012f0| 74 79 6c 65 72 54 61 62 | 6c 65 20 68 53 74 79 6c |tylerTab|le hStyl|
|00001300| 65 72 73 20 3d 20 28 2a | 68 57 45 29 2d 3e 68 53 |ers = (*|hWE)->hS|
|00001310| 74 79 6c 65 72 73 3b 0d | 09 09 09 69 66 20 28 68 |tylers;.|...if (h|
|00001320| 53 74 79 6c 65 72 73 20 | 3d 3d 20 6e 69 6c 29 0d |Stylers |== nil).|
|00001330| 09 09 09 7b 0d 09 09 09 | 09 68 53 74 79 6c 65 72 |...{....|.hStyler|
|00001340| 73 20 3d 20 28 57 45 53 | 74 79 6c 65 72 54 61 62 |s = (WES|tylerTab|
|00001350| 6c 65 29 20 4e 65 77 48 | 61 6e 64 6c 65 28 30 29 |le) NewH|andle(0)|
|00001360| 3b 0d 09 09 09 09 69 66 | 20 28 28 65 72 72 20 3d |;.....if| ((err =|
|00001370| 20 4d 65 6d 45 72 72 6f | 72 28 29 29 20 21 3d 20 | MemErro|r()) != |
|00001380| 6e 6f 45 72 72 29 0d 09 | 09 09 09 7b 0d 09 09 09 |noErr)..|...{....|
|00001390| 09 09 72 65 74 75 72 6e | 20 65 72 72 3b 0d 09 09 |..return| err;...|
|000013a0| 09 09 7d 0d 09 09 09 09 | 28 2a 68 57 45 29 2d 3e |..}.....|(*hWE)->|
|000013b0| 68 53 74 79 6c 65 72 73 | 20 3d 20 68 53 74 79 6c |hStylers| = hStyl|
|000013c0| 65 72 73 3b 0d 09 09 09 | 7d 0d 0d 09 09 09 65 72 |ers;....|}.....er|
|000013d0| 72 20 3d 20 5f 57 45 53 | 70 6c 69 63 65 28 28 48 |r = _WES|plice((H|
|000013e0| 61 6e 64 6c 65 29 20 68 | 53 74 79 6c 65 72 73 2c |andle) h|Stylers,|
|000013f0| 20 26 73 74 79 6c 65 72 | 2c 20 73 69 7a 65 6f 66 | &styler|, sizeof|
|00001400| 28 57 45 53 74 79 6c 65 | 72 52 65 66 65 72 65 6e |(WEStyle|rReferen|
|00001410| 63 65 29 2c 20 2d 31 29 | 3b 0d 09 09 7d 0d 09 7d |ce), -1)|;...}..}|
|00001420| 0d 0d 09 72 65 74 75 72 | 6e 20 65 72 72 3b 0d 7d |...retur|n err;.}|
|00001430| 0d 0d 70 61 73 63 61 6c | 20 4f 53 45 72 72 20 5f |..pascal| OSErr _|
|00001440| 57 45 52 65 6d 6f 76 65 | 53 74 79 6c 65 72 28 57 |WERemove|Styler(W|
|00001450| 45 53 74 79 6c 65 72 52 | 65 66 65 72 65 6e 63 65 |EStylerR|eference|
|00001460| 20 73 74 79 6c 65 72 29 | 0d 7b 0d 09 4f 53 45 72 | styler)|.{..OSEr|
|00001470| 72 20 65 72 72 20 3d 20 | 6e 6f 45 72 72 3b 0d 0d |r err = |noErr;..|
|00001480| 09 69 66 20 28 73 74 79 | 6c 65 72 29 0d 09 7b 0d |.if (sty|ler)..{.|
|00001490| 09 09 57 45 48 61 6e 64 | 6c 65 20 68 57 45 20 3d |..WEHand|le hWE =|
|000014a0| 20 57 45 47 65 74 53 74 | 79 6c 65 72 4f 77 6e 65 | WEGetSt|ylerOwne|
|000014b0| 72 28 73 74 79 6c 65 72 | 29 3b 0d 09 09 69 66 20 |r(styler|);...if |
|000014c0| 28 68 57 45 29 0d 09 09 | 7b 0d 09 09 09 57 45 53 |(hWE)...|{....WES|
|000014d0| 74 79 6c 65 72 54 61 62 | 6c 65 20 68 53 74 79 6c |tylerTab|le hStyl|
|000014e0| 65 72 73 20 3d 20 28 2a | 68 57 45 29 2d 3e 68 53 |ers = (*|hWE)->hS|
|000014f0| 74 79 6c 65 72 73 3b 0d | 09 09 09 69 66 20 28 68 |tylers;.|...if (h|
|00001500| 53 74 79 6c 65 72 73 20 | 21 3d 20 6e 69 6c 29 0d |Stylers |!= nil).|
|00001510| 09 09 09 7b 0d 09 09 09 | 09 53 49 6e 74 33 32 20 |...{....|.SInt32 |
|00001520| 69 6e 64 65 78 20 3d 20 | 30 3b 0d 09 09 09 09 53 |index = |0;.....S|
|00001530| 49 6e 74 33 32 20 6e 45 | 6e 74 72 69 65 73 20 3d |Int32 nE|ntries =|
|00001540| 20 47 65 74 48 61 6e 64 | 6c 65 53 69 7a 65 28 28 | GetHand|leSize((|
|00001550| 48 61 6e 64 6c 65 29 20 | 68 53 74 79 6c 65 72 73 |Handle) |hStylers|
|00001560| 29 20 2f 20 73 69 7a 65 | 6f 66 28 57 45 53 74 79 |) / size|of(WESty|
|00001570| 6c 65 72 52 65 66 65 72 | 65 6e 63 65 29 3b 0d 09 |lerRefer|ence);..|
|00001580| 09 09 09 66 6f 72 20 28 | 69 6e 64 65 78 20 3d 20 |...for (|index = |
|00001590| 30 3b 20 69 6e 64 65 78 | 20 3c 20 6e 45 6e 74 72 |0; index| < nEntr|
|000015a0| 69 65 73 3b 20 2b 2b 69 | 6e 64 65 78 29 0d 09 09 |ies; ++i|ndex)...|
|000015b0| 09 09 7b 0d 09 09 09 09 | 09 69 66 20 28 28 2a 68 |..{.....|.if ((*h|
|000015c0| 53 74 79 6c 65 72 73 29 | 5b 69 6e 64 65 78 5d 20 |Stylers)|[index] |
|000015d0| 3d 3d 20 73 74 79 6c 65 | 72 29 0d 09 09 09 09 09 |== style|r)......|
|000015e0| 7b 0d 09 09 09 09 09 09 | 65 72 72 20 3d 20 5f 57 |{.......|err = _W|
|000015f0| 45 53 70 6c 69 63 65 28 | 28 48 61 6e 64 6c 65 29 |ESplice(|(Handle)|
|00001600| 20 68 53 74 79 6c 65 72 | 73 2c 20 4e 55 4c 4c 2c | hStyler|s, NULL,|
|00001610| 20 2d 73 69 7a 65 6f 66 | 28 57 45 53 74 79 6c 65 | -sizeof|(WEStyle|
|00001620| 72 52 65 66 65 72 65 6e | 63 65 29 2c 20 69 6e 64 |rReferen|ce), ind|
|00001630| 65 78 20 2a 20 73 69 7a | 65 6f 66 28 57 45 53 74 |ex * siz|eof(WESt|
|00001640| 79 6c 65 72 52 65 66 65 | 72 65 6e 63 65 29 29 3b |ylerRefe|rence));|
|00001650| 0d 09 09 09 09 09 09 62 | 72 65 61 6b 3b 0d 09 09 |.......b|reak;...|
|00001660| 09 09 09 7d 0d 09 09 09 | 09 7d 0d 09 09 09 7d 0d |...}....|.}....}.|
|00001670| 09 09 7d 0d 09 7d 0d 0d | 09 72 65 74 75 72 6e 20 |..}..}..|.return |
|00001680| 65 72 72 3b 0d 7d 0d 0d | 70 61 73 63 61 6c 20 4f |err;.}..|pascal O|
|00001690| 53 45 72 72 20 5f 57 45 | 52 65 73 65 74 53 74 79 |SErr _WE|ResetSty|
|000016a0| 6c 65 72 73 28 57 45 53 | 74 79 6c 65 72 54 61 62 |lers(WES|tylerTab|
|000016b0| 6c 65 20 68 53 74 79 6c | 65 72 73 29 0d 7b 0d 09 |le hStyl|ers).{..|
|000016c0| 4f 53 45 72 72 20 65 72 | 72 20 3d 20 6e 6f 45 72 |OSErr er|r = noEr|
|000016d0| 72 3b 0d 0d 09 69 66 20 | 28 68 53 74 79 6c 65 72 |r;...if |(hStyler|
|000016e0| 73 20 21 3d 20 6e 69 6c | 29 0d 09 7b 0d 09 09 53 |s != nil|)..{...S|
|000016f0| 49 6e 74 33 32 20 69 6e | 64 65 78 20 3d 20 47 65 |Int32 in|dex = Ge|
|00001700| 74 48 61 6e 64 6c 65 53 | 69 7a 65 28 28 48 61 6e |tHandleS|ize((Han|
|00001710| 64 6c 65 29 20 68 53 74 | 79 6c 65 72 73 29 20 2f |dle) hSt|ylers) /|
|00001720| 20 73 69 7a 65 6f 66 28 | 57 45 53 74 79 6c 65 72 | sizeof(|WEStyler|
|00001730| 52 65 66 65 72 65 6e 63 | 65 29 3b 0d 09 09 77 68 |Referenc|e);...wh|
|00001740| 69 6c 65 20 28 2d 2d 69 | 6e 64 65 78 20 3e 3d 20 |ile (--i|ndex >= |
|00001750| 30 29 0d 09 09 7b 0d 09 | 09 09 57 45 53 74 79 6c |0)...{..|..WEStyl|
|00001760| 65 72 52 65 66 65 72 65 | 6e 63 65 20 73 74 79 6c |erRefere|nce styl|
|00001770| 65 72 20 3d 20 28 2a 68 | 53 74 79 6c 65 72 73 29 |er = (*h|Stylers)|
|00001780| 5b 69 6e 64 65 78 5d 3b | 0d 09 09 09 57 45 44 69 |[index];|....WEDi|
|00001790| 73 70 6f 73 65 53 74 79 | 6c 65 72 28 73 74 79 6c |sposeSty|ler(styl|
|000017a0| 65 72 29 3b 0d 09 09 7d | 0d 09 7d 0d 0d 09 72 65 |er);...}|..}...re|
|000017b0| 74 75 72 6e 20 65 72 72 | 3b 0d 7d 0d 0d 70 61 73 |turn err|;.}..pas|
|000017c0| 63 61 6c 20 42 6f 6f 6c | 65 61 6e 20 5f 57 45 44 |cal Bool|ean _WED|
|000017d0| 72 61 77 53 74 79 6c 65 | 72 28 50 74 72 20 70 54 |rawStyle|r(Ptr pT|
|000017e0| 65 78 74 2c 20 53 49 6e | 74 33 32 20 74 65 78 74 |ext, SIn|t32 text|
|000017f0| 4c 65 6e 67 74 68 2c 20 | 46 69 78 65 64 20 73 6c |Length, |Fixed sl|
|00001800| 6f 70 2c 20 4a 75 73 74 | 53 74 79 6c 65 43 6f 64 |op, Just|StyleCod|
|00001810| 65 20 73 74 79 6c 65 52 | 75 6e 50 6f 73 69 74 69 |e styleR|unPositi|
|00001820| 6f 6e 2c 20 0d 09 09 09 | 09 09 09 09 20 57 45 53 |on, ....|.... WES|
|00001830| 74 79 6c 65 72 52 65 66 | 65 72 65 6e 63 65 20 73 |tylerRef|erence s|
|00001840| 74 79 6c 65 72 29 0d 7b | 0d 09 42 6f 6f 6c 65 61 |tyler).{|..Boolea|
|00001850| 6e 20 68 61 6e 64 6c 65 | 64 20 3d 20 66 61 6c 73 |n handle|d = fals|
|00001860| 65 3b 0d 09 57 45 53 74 | 79 6c 65 72 20 2a 70 44 |e;..WESt|yler *pD|
|00001870| 65 73 63 3b 0d 09 42 6f | 6f 6c 65 61 6e 20 73 61 |esc;..Bo|olean sa|
|00001880| 76 65 44 65 73 63 4c 6f | 63 6b 3b 0d 0d 09 2f 2f |veDescLo|ck;...//|
|00001890| 20 6c 6f 63 6b 20 74 68 | 65 20 73 74 79 6c 65 72 | lock th|e styler|
|000018a0| 20 64 65 73 63 72 69 70 | 74 6f 72 0d 09 73 61 76 | descrip|tor..sav|
|000018b0| 65 44 65 73 63 4c 6f 63 | 6b 20 3d 20 5f 57 45 53 |eDescLoc|k = _WES|
|000018c0| 65 74 48 61 6e 64 6c 65 | 4c 6f 63 6b 28 28 48 61 |etHandle|Lock((Ha|
|000018d0| 6e 64 6c 65 29 73 74 79 | 6c 65 72 2c 20 74 72 75 |ndle)sty|ler, tru|
|000018e0| 65 29 3b 0d 09 70 44 65 | 73 63 20 3d 20 2a 73 74 |e);..pDe|sc = *st|
|000018f0| 79 6c 65 72 3b 0d 0d 09 | 69 66 20 28 5f 77 65 53 |yler;...|if (_weS|
|00001900| 74 79 6c 65 72 48 61 6e | 64 6c 65 72 54 61 62 6c |tylerHan|dlerTabl|
|00001910| 65 20 21 3d 20 6e 69 6c | 29 0d 09 7b 0d 09 09 57 |e != nil|)..{...W|
|00001920| 45 53 74 79 6c 65 72 44 | 72 61 77 55 50 50 20 73 |EStylerD|rawUPP s|
|00001930| 74 79 6c 65 72 44 72 61 | 77 20 3d 20 28 2a 5f 77 |tylerDra|w = (*_w|
|00001940| 65 53 74 79 6c 65 72 48 | 61 6e 64 6c 65 72 54 61 |eStylerH|andlerTa|
|00001950| 62 6c 65 29 5b 70 44 65 | 73 63 2d 3e 73 74 79 6c |ble)[pDe|sc->styl|
|00001960| 65 72 49 6e 64 65 78 5d | 2e 73 74 79 6c 65 72 44 |erIndex]|.stylerD|
|00001970| 72 61 77 3b 0d 0d 09 09 | 2f 2f 20 63 61 6c 6c 20 |raw;....|// call |
|00001980| 74 68 65 20 64 72 61 77 | 69 6e 67 20 68 61 6e 64 |the draw|ing hand|
|00001990| 6c 65 72 2c 20 69 66 20 | 61 6e 79 0d 09 09 69 66 |ler, if |any...if|
|000019a0| 20 28 73 74 79 6c 65 72 | 44 72 61 77 20 21 3d 20 | (styler|Draw != |
|000019b0| 6e 69 6c 29 0d 09 09 7b | 0d 09 09 09 68 61 6e 64 |nil)...{|....hand|
|000019c0| 6c 65 64 20 3d 20 43 61 | 6c 6c 57 45 53 74 79 6c |led = Ca|llWEStyl|
|000019d0| 65 72 44 72 61 77 50 72 | 6f 63 28 70 54 65 78 74 |erDrawPr|oc(pText|
|000019e0| 2c 20 74 65 78 74 4c 65 | 6e 67 74 68 2c 20 73 6c |, textLe|ngth, sl|
|000019f0| 6f 70 2c 20 73 74 79 6c | 65 52 75 6e 50 6f 73 69 |op, styl|eRunPosi|
|00001a00| 74 69 6f 6e 2c 20 73 74 | 79 6c 65 72 2c 20 73 74 |tion, st|yler, st|
|00001a10| 79 6c 65 72 44 72 61 77 | 29 3b 0d 09 09 7d 0d 09 |ylerDraw|);...}..|
|00001a20| 7d 0d 0d 09 2f 2f 20 75 | 6e 6c 6f 63 6b 20 74 68 |}...// u|nlock th|
|00001a30| 65 20 73 74 79 6c 65 72 | 20 64 65 73 63 72 69 70 |e styler| descrip|
|00001a40| 74 6f 72 0d 09 5f 57 45 | 53 65 74 48 61 6e 64 6c |tor.._WE|SetHandl|
|00001a50| 65 4c 6f 63 6b 28 28 48 | 61 6e 64 6c 65 29 73 74 |eLock((H|andle)st|
|00001a60| 79 6c 65 72 2c 20 73 61 | 76 65 44 65 73 63 4c 6f |yler, sa|veDescLo|
|00001a70| 63 6b 29 3b 0d 0d 09 72 | 65 74 75 72 6e 20 68 61 |ck);...r|eturn ha|
|00001a80| 6e 64 6c 65 64 3b 0d 7d | 0d 0d 70 61 73 63 61 6c |ndled;.}|..pascal|
|00001a90| 20 42 6f 6f 6c 65 61 6e | 20 5f 57 45 43 6c 69 63 | Boolean| _WEClic|
|00001aa0| 6b 53 74 79 6c 65 72 28 | 50 6f 69 6e 74 20 68 69 |kStyler(|Point hi|
|00001ab0| 74 50 74 2c 20 45 76 65 | 6e 74 4d 6f 64 69 66 69 |tPt, Eve|ntModifi|
|00001ac0| 65 72 73 20 6d 6f 64 69 | 66 69 65 72 73 2c 20 55 |ers modi|fiers, U|
|00001ad0| 49 6e 74 33 32 20 63 6c | 69 63 6b 54 69 6d 65 2c |Int32 cl|ickTime,|
|00001ae0| 0d 09 09 09 09 09 09 09 | 20 20 57 45 53 74 79 6c |........| WEStyl|
|00001af0| 65 72 52 65 66 65 72 65 | 6e 63 65 20 73 74 79 6c |erRefere|nce styl|
|00001b00| 65 72 29 0d 7b 0d 09 57 | 45 53 74 79 6c 65 72 20 |er).{..W|EStyler |
|00001b10| 2a 70 44 65 73 63 3b 0d | 09 42 6f 6f 6c 65 61 6e |*pDesc;.|.Boolean|
|00001b20| 20 73 61 76 65 44 65 73 | 63 4c 6f 63 6b 3b 0d 09 | saveDes|cLock;..|
|00001b30| 42 6f 6f 6c 65 61 6e 20 | 63 6c 69 63 6b 48 61 6e |Boolean |clickHan|
|00001b40| 64 6c 65 64 20 3d 20 66 | 61 6c 73 65 3b 0d 0d 09 |dled = f|alse;...|
|00001b50| 2f 2f 20 6c 6f 63 6b 20 | 74 68 65 20 73 74 79 6c |// lock |the styl|
|00001b60| 65 72 20 64 65 73 63 72 | 69 70 74 6f 72 0d 09 73 |er descr|iptor..s|
|00001b70| 61 76 65 44 65 73 63 4c | 6f 63 6b 20 3d 20 5f 57 |aveDescL|ock = _W|
|00001b80| 45 53 65 74 48 61 6e 64 | 6c 65 4c 6f 63 6b 28 28 |ESetHand|leLock((|
|00001b90| 48 61 6e 64 6c 65 29 73 | 74 79 6c 65 72 2c 20 74 |Handle)s|tyler, t|
|00001ba0| 72 75 65 29 3b 0d 09 70 | 44 65 73 63 20 3d 20 2a |rue);..p|Desc = *|
|00001bb0| 73 74 79 6c 65 72 3b 0d | 0d 09 69 66 20 28 5f 77 |styler;.|..if (_w|
|00001bc0| 65 53 74 79 6c 65 72 48 | 61 6e 64 6c 65 72 54 61 |eStylerH|andlerTa|
|00001bd0| 62 6c 65 20 21 3d 20 6e | 69 6c 29 0d 09 7b 0d 09 |ble != n|il)..{..|
|00001be0| 09 57 45 53 74 79 6c 65 | 72 43 6c 69 63 6b 55 50 |.WEStyle|rClickUP|
|00001bf0| 50 20 73 74 79 6c 65 72 | 43 6c 69 63 6b 20 3d 20 |P styler|Click = |
|00001c00| 28 2a 5f 77 65 53 74 79 | 6c 65 72 48 61 6e 64 6c |(*_weSty|lerHandl|
|00001c10| 65 72 54 61 62 6c 65 29 | 5b 70 44 65 73 63 2d 3e |erTable)|[pDesc->|
|00001c20| 73 74 79 6c 65 72 49 6e | 64 65 78 5d 2e 73 74 79 |stylerIn|dex].sty|
|00001c30| 6c 65 72 43 6c 69 63 6b | 3b 0d 0d 09 09 2f 2f 20 |lerClick|;....// |
|00001c40| 63 61 6c 6c 20 74 68 65 | 20 63 6c 69 63 6b 20 68 |call the| click h|
|00001c50| 61 6e 64 6c 65 72 2c 20 | 69 66 20 61 6e 79 0d 09 |andler, |if any..|
|00001c60| 09 69 66 20 28 73 74 79 | 6c 65 72 43 6c 69 63 6b |.if (sty|lerClick|
|00001c70| 20 21 3d 20 6e 69 6c 29 | 0d 09 09 7b 0d 09 09 09 | != nil)|...{....|
|00001c80| 63 6c 69 63 6b 48 61 6e | 64 6c 65 64 20 3d 20 43 |clickHan|dled = C|
|00001c90| 61 6c 6c 57 45 53 74 79 | 6c 65 72 43 6c 69 63 6b |allWESty|lerClick|
|00001ca0| 50 72 6f 63 28 68 69 74 | 50 74 2c 20 6d 6f 64 69 |Proc(hit|Pt, modi|
|00001cb0| 66 69 65 72 73 2c 20 63 | 6c 69 63 6b 54 69 6d 65 |fiers, c|lickTime|
|00001cc0| 2c 20 73 74 79 6c 65 72 | 2c 20 73 74 79 6c 65 72 |, styler|, styler|
|00001cd0| 43 6c 69 63 6b 29 3b 0d | 09 09 7d 0d 09 7d 0d 0d |Click);.|..}..}..|
|00001ce0| 09 2f 2f 20 75 6e 6c 6f | 63 6b 20 74 68 65 20 73 |.// unlo|ck the s|
|00001cf0| 74 79 6c 65 72 20 64 65 | 73 63 72 69 70 74 6f 72 |tyler de|scriptor|
|00001d00| 0d 09 5f 57 45 53 65 74 | 48 61 6e 64 6c 65 4c 6f |.._WESet|HandleLo|
|00001d10| 63 6b 28 28 48 61 6e 64 | 6c 65 29 73 74 79 6c 65 |ck((Hand|le)style|
|00001d20| 72 2c 20 73 61 76 65 44 | 65 73 63 4c 6f 63 6b 29 |r, saveD|escLock)|
|00001d30| 3b 0d 0d 09 72 65 74 75 | 72 6e 20 63 6c 69 63 6b |;...retu|rn click|
|00001d40| 48 61 6e 64 6c 65 64 3b | 0d 7d 0d 0d 70 61 73 63 |Handled;|.}..pasc|
|00001d50| 61 6c 20 4f 53 45 72 72 | 20 5f 57 45 53 74 72 65 |al OSErr| _WEStre|
|00001d60| 61 6d 53 74 79 6c 65 72 | 28 53 49 6e 74 31 36 20 |amStyler|(SInt16 |
|00001d70| 64 65 73 74 4b 69 6e 64 | 2c 20 46 6c 61 76 6f 72 |destKind|, Flavor|
|00001d80| 54 79 70 65 20 2a 74 68 | 65 54 79 70 65 2c 20 48 |Type *th|eType, H|
|00001d90| 61 6e 64 6c 65 20 2a 74 | 68 65 44 61 74 61 2c 20 |andle *t|heData, |
|00001da0| 0d 09 09 09 09 09 09 09 | 20 42 6f 6f 6c 65 61 6e |........| Boolean|
|00001db0| 20 2a 63 61 6e 44 69 73 | 70 6f 73 65 44 61 74 61 | *canDis|poseData|
|00001dc0| 2c 20 57 45 53 74 79 6c | 65 72 52 65 66 65 72 65 |, WEStyl|erRefere|
|00001dd0| 6e 63 65 20 73 74 79 6c | 65 72 29 0d 7b 0d 09 57 |nce styl|er).{..W|
|00001de0| 45 53 74 79 6c 65 72 20 | 2a 70 44 65 73 63 3b 0d |EStyler |*pDesc;.|
|00001df0| 09 42 6f 6f 6c 65 61 6e | 20 73 61 76 65 44 65 73 |.Boolean| saveDes|
|00001e00| 63 4c 6f 63 6b 3b 0d 09 | 4f 53 45 72 72 20 65 72 |cLock;..|OSErr er|
|00001e10| 72 20 3d 20 77 65 4e 6f | 74 48 61 6e 64 6c 65 64 |r = weNo|tHandled|
|00001e20| 45 72 72 3b 0d 0d 09 2a | 63 61 6e 44 69 73 70 6f |Err;...*|canDispo|
|00001e30| 73 65 44 61 74 61 20 3d | 20 74 72 75 65 3b 0d 0d |seData =| true;..|
|00001e40| 09 2f 2f 20 6c 6f 63 6b | 20 74 68 65 20 73 74 79 |.// lock| the sty|
|00001e50| 6c 65 72 20 64 65 73 63 | 72 69 70 74 6f 72 0d 09 |ler desc|riptor..|
|00001e60| 73 61 76 65 44 65 73 63 | 4c 6f 63 6b 20 3d 20 5f |saveDesc|Lock = _|
|00001e70| 57 45 53 65 74 48 61 6e | 64 6c 65 4c 6f 63 6b 28 |WESetHan|dleLock(|
|00001e80| 28 48 61 6e 64 6c 65 29 | 73 74 79 6c 65 72 2c 20 |(Handle)|styler, |
|00001e90| 74 72 75 65 29 3b 0d 09 | 70 44 65 73 63 20 3d 20 |true);..|pDesc = |
|00001ea0| 2a 73 74 79 6c 65 72 3b | 0d 0d 09 7b 0d 09 09 57 |*styler;|...{...W|
|00001eb0| 45 53 74 79 6c 65 72 53 | 74 72 65 61 6d 55 50 50 |EStylerS|treamUPP|
|00001ec0| 20 73 74 72 65 61 6d 48 | 61 6e 64 6c 65 72 20 3d | streamH|andler =|
|00001ed0| 20 28 2a 5f 77 65 53 74 | 79 6c 65 72 48 61 6e 64 | (*_weSt|ylerHand|
|00001ee0| 6c 65 72 54 61 62 6c 65 | 29 5b 70 44 65 73 63 2d |lerTable|)[pDesc-|
|00001ef0| 3e 73 74 79 6c 65 72 49 | 6e 64 65 78 5d 2e 73 74 |>stylerI|ndex].st|
|00001f00| 79 6c 65 72 53 74 72 65 | 61 6d 3b 0d 0d 09 09 2f |ylerStre|am;..../|
|00001f10| 2f 20 63 61 6c 6c 20 74 | 68 65 20 73 74 72 65 61 |/ call t|he strea|
|00001f20| 6d 20 68 61 6e 64 6c 65 | 72 2c 20 69 66 20 61 6e |m handle|r, if an|
|00001f30| 79 0d 09 09 69 66 20 28 | 73 74 72 65 61 6d 48 61 |y...if (|streamHa|
|00001f40| 6e 64 6c 65 72 20 21 3d | 20 6e 69 6c 29 0d 09 09 |ndler !=| nil)...|
|00001f50| 7b 0d 09 09 09 65 72 72 | 20 3d 20 43 61 6c 6c 57 |{....err| = CallW|
|00001f60| 45 53 74 79 6c 65 72 53 | 74 72 65 61 6d 50 72 6f |EStylerS|treamPro|
|00001f70| 63 28 64 65 73 74 4b 69 | 6e 64 2c 20 74 68 65 54 |c(destKi|nd, theT|
|00001f80| 79 70 65 2c 20 2a 74 68 | 65 44 61 74 61 2c 20 73 |ype, *th|eData, s|
|00001f90| 74 79 6c 65 72 2c 20 73 | 74 72 65 61 6d 48 61 6e |tyler, s|treamHan|
|00001fa0| 64 6c 65 72 29 3b 0d 09 | 09 7d 0d 09 7d 0d 0d 09 |dler);..|.}..}...|
|00001fb0| 69 66 20 28 65 72 72 20 | 3d 3d 20 77 65 4e 6f 74 |if (err |== weNot|
|00001fc0| 48 61 6e 64 6c 65 64 45 | 72 72 29 0d 09 7b 0d 09 |HandledE|rr)..{..|
|00001fd0| 09 2f 2f 20 64 65 66 61 | 75 6c 74 20 73 74 72 65 |.// defa|ult stre|
|00001fe0| 61 6d 69 6e 67 20 62 65 | 68 61 76 69 6f 72 0d 09 |aming be|havior..|
|00001ff0| 09 5f 57 45 46 6f 72 67 | 65 74 48 61 6e 64 6c 65 |._WEForg|etHandle|
|00002000| 28 74 68 65 44 61 74 61 | 29 3b 0d 09 09 2a 63 61 |(theData|);...*ca|
|00002010| 6e 44 69 73 70 6f 73 65 | 44 61 74 61 20 3d 20 66 |nDispose|Data = f|
|00002020| 61 6c 73 65 3b 0d 09 09 | 2a 74 68 65 54 79 70 65 |alse;...|*theType|
|00002030| 20 3d 20 70 44 65 73 63 | 2d 3e 73 74 79 6c 65 72 | = pDesc|->styler|
|00002040| 54 79 70 65 3b 0d 09 09 | 2a 74 68 65 44 61 74 61 |Type;...|*theData|
|00002050| 20 3d 20 70 44 65 73 63 | 2d 3e 73 74 79 6c 65 72 | = pDesc|->styler|
|00002060| 44 61 74 61 48 61 6e 64 | 6c 65 3b 0d 09 09 65 72 |DataHand|le;...er|
|00002070| 72 20 3d 20 6e 6f 45 72 | 72 3b 0d 09 7d 0d 0d 09 |r = noEr|r;..}...|
|00002080| 2f 2f 20 75 6e 6c 6f 63 | 6b 20 74 68 65 20 73 74 |// unloc|k the st|
|00002090| 79 6c 65 72 20 64 65 73 | 63 72 69 70 74 6f 72 0d |yler des|criptor.|
|000020a0| 09 5f 57 45 53 65 74 48 | 61 6e 64 6c 65 4c 6f 63 |._WESetH|andleLoc|
|000020b0| 6b 28 28 48 61 6e 64 6c | 65 29 20 73 74 79 6c 65 |k((Handl|e) style|
|000020c0| 72 2c 20 73 61 76 65 44 | 65 73 63 4c 6f 63 6b 29 |r, saveD|escLock)|
|000020d0| 3b 0d 0d 09 72 65 74 75 | 72 6e 20 65 72 72 3b 0d |;...retu|rn err;.|
|000020e0| 7d 0d 0d 70 61 73 63 61 | 6c 20 4f 53 45 72 72 20 |}..pasca|l OSErr |
|000020f0| 5f 57 45 53 6f 75 70 53 | 74 79 6c 65 72 28 57 45 |_WESoupS|tyler(WE|
|00002100| 53 6f 75 70 48 61 6e 64 | 6c 65 20 2a 68 53 74 79 |SoupHand|le *hSty|
|00002110| 6c 65 72 53 6f 75 70 2c | 20 63 6f 6e 73 74 20 57 |lerSoup,| const W|
|00002120| 45 52 75 6e 49 6e 66 6f | 50 72 69 76 20 2a 69 6e |ERunInfo|Priv *in|
|00002130| 66 6f 2c 20 53 49 6e 74 | 33 32 20 6f 66 66 73 65 |fo, SInt|32 offse|
|00002140| 74 29 0d 7b 0d 09 2f 2f | 20 69 66 20 69 6e 66 6f |t).{..//| if info|
|00002150| 20 64 65 73 63 72 69 62 | 65 73 20 61 6e 20 65 6d | describ|es an em|
|00002160| 62 65 64 64 65 64 20 73 | 74 79 6c 65 72 2c 20 63 |bedded s|tyler, c|
|00002170| 6f 70 79 20 61 20 6e 65 | 77 20 73 74 79 6c 65 72 |opy a ne|w styler|
|00002180| 20 64 65 73 63 72 69 70 | 74 6f 72 2c 0d 09 2f 2f | descrip|tor,..//|
|00002190| 20 63 6f 6d 70 6c 65 74 | 65 20 77 69 74 68 20 74 | complet|e with t|
|000021a0| 68 65 20 61 73 73 6f 63 | 69 61 74 65 64 20 73 74 |he assoc|iated st|
|000021b0| 79 6c 65 72 20 64 61 74 | 61 2c 20 74 6f 20 61 20 |yler dat|a, to a |
|000021c0| 6e 65 77 20 73 6f 75 70 | 20 68 61 6e 64 6c 65 2e |new soup| handle.|
|000021d0| 0d 0d 09 57 45 53 74 79 | 6c 65 72 52 65 66 65 72 |...WESty|lerRefer|
|000021e0| 65 6e 63 65 20 73 74 79 | 6c 65 72 20 3d 20 69 6e |ence sty|ler = in|
|000021f0| 66 6f 2d 3e 72 75 6e 41 | 74 74 72 73 2e 72 75 6e |fo->runA|ttrs.run|
|00002200| 53 74 79 6c 65 2e 74 73 | 53 74 79 6c 65 72 3b 0d |Style.ts|Styler;.|
|00002210| 09 48 61 6e 64 6c 65 20 | 68 53 74 79 6c 65 72 44 |.Handle |hStylerD|
|00002220| 61 74 61 20 3d 20 6e 69 | 6c 3b 0d 09 42 6f 6f 6c |ata = ni|l;..Bool|
|00002230| 65 61 6e 20 64 69 73 70 | 6f 73 65 44 61 74 61 20 |ean disp|oseData |
|00002240| 3d 20 66 61 6c 73 65 3b | 0d 09 4f 53 45 72 72 20 |= false;|..OSErr |
|00002250| 65 72 72 20 3d 20 6e 6f | 45 72 72 3b 0d 0d 09 2a |err = no|Err;...*|
|00002260| 68 53 74 79 6c 65 72 53 | 6f 75 70 20 3d 20 6e 69 |hStylerS|oup = ni|
|00002270| 6c 3b 0d 0d 09 69 66 20 | 28 73 74 79 6c 65 72 20 |l;...if |(styler |
|00002280| 21 3d 20 6e 69 6c 29 0d | 09 7b 0d 09 09 46 6c 61 |!= nil).|.{...Fla|
|00002290| 76 6f 72 54 79 70 65 20 | 73 74 79 6c 65 72 54 79 |vorType |stylerTy|
|000022a0| 70 65 3b 0d 09 09 57 45 | 53 6f 75 70 20 73 6f 75 |pe;...WE|Soup sou|
|000022b0| 70 3b 0d 0d 09 09 2f 2f | 20 63 72 65 61 74 65 20 |p;....//| create |
|000022c0| 61 20 74 65 6d 70 6f 72 | 61 72 79 20 68 61 6e 64 |a tempor|ary hand|
|000022d0| 6c 65 20 66 6f 72 20 74 | 68 65 20 73 74 72 65 61 |le for t|he strea|
|000022e0| 6d 69 6e 67 20 63 61 6c | 6c 62 61 63 6b 0d 09 09 |ming cal|lback...|
|000022f0| 69 66 20 28 28 65 72 72 | 20 3d 20 5f 57 45 41 6c |if ((err| = _WEAl|
|00002300| 6c 6f 63 61 74 65 28 30 | 2c 20 6b 41 6c 6c 6f 63 |locate(0|, kAlloc|
|00002310| 54 65 6d 70 2c 20 26 68 | 53 74 79 6c 65 72 44 61 |Temp, &h|StylerDa|
|00002320| 74 61 29 29 20 21 3d 20 | 6e 6f 45 72 72 29 0d 09 |ta)) != |noErr)..|
|00002330| 09 7b 0d 09 09 09 67 6f | 74 6f 20 63 6c 65 61 6e |.{....go|to clean|
|00002340| 75 70 3b 0d 09 09 7d 0d | 0d 09 09 2f 2f 20 67 65 |up;...}.|...// ge|
|00002350| 74 20 74 68 65 20 73 74 | 79 6c 65 72 20 74 79 70 |t the st|yler typ|
|00002360| 65 2f 64 61 74 61 0d 09 | 09 69 66 20 28 28 65 72 |e/data..|.if ((er|
|00002370| 72 20 3d 20 5f 57 45 53 | 74 72 65 61 6d 53 74 79 |r = _WES|treamSty|
|00002380| 6c 65 72 28 77 65 54 6f | 53 6f 75 70 2c 20 26 73 |ler(weTo|Soup, &s|
|00002390| 74 79 6c 65 72 54 79 70 | 65 2c 20 26 68 53 74 79 |tylerTyp|e, &hSty|
|000023a0| 6c 65 72 44 61 74 61 2c | 20 26 64 69 73 70 6f 73 |lerData,| &dispos|
|000023b0| 65 44 61 74 61 2c 20 73 | 74 79 6c 65 72 29 29 20 |eData, s|tyler)) |
|000023c0| 21 3d 20 6e 6f 45 72 72 | 29 0d 09 09 7b 0d 09 09 |!= noErr|)...{...|
|000023d0| 09 67 6f 74 6f 20 63 6c | 65 61 6e 75 70 3b 0d 09 |.goto cl|eanup;..|
|000023e0| 09 7d 0d 0d 09 09 2f 2f | 20 66 69 6c 6c 20 69 6e |.}....//| fill in|
|000023f0| 20 61 20 73 6f 75 70 20 | 69 74 65 6d 0d 09 09 42 | a soup |item...B|
|00002400| 4c 4f 43 4b 5f 43 4c 52 | 28 73 6f 75 70 29 3b 0d |LOCK_CLR|(soup);.|
|00002410| 09 09 73 6f 75 70 2e 73 | 6f 75 70 4f 66 66 73 65 |..soup.s|oupOffse|
|00002420| 74 20 3d 20 6f 66 66 73 | 65 74 3b 0d 09 09 73 6f |t = offs|et;...so|
|00002430| 75 70 2e 73 6f 75 70 54 | 79 70 65 20 3d 20 73 74 |up.soupT|ype = st|
|00002440| 79 6c 65 72 54 79 70 65 | 3b 0d 09 09 2f 2f 20 68 |ylerType|;...// h|
|00002450| 61 63 6b 3a 20 74 68 65 | 20 73 74 79 6c 65 72 20 |ack: the| styler |
|00002460| 68 61 73 20 61 20 6c 65 | 6e 67 74 68 20 6c 69 6b |has a le|ngth lik|
|00002470| 65 20 61 20 72 75 6e 20 | 6f 66 20 74 65 78 74 20 |e a run |of text |
|00002480| 69 6e 73 74 65 61 64 0d | 09 09 2f 2f 20 6f 66 20 |instead.|..// of |
|00002490| 61 20 64 69 6d 65 6e 73 | 69 6f 6e 20 6c 69 6b 65 |a dimens|ion like|
|000024a0| 20 61 6e 20 6f 62 6a 65 | 63 74 0d 09 09 2a 28 6c | an obje|ct...*(l|
|000024b0| 6f 6e 67 20 2a 29 26 73 | 6f 75 70 2e 73 6f 75 70 |ong *)&s|oup.soup|
|000024c0| 53 69 7a 65 20 3d 20 69 | 6e 66 6f 2d 3e 72 75 6e |Size = i|nfo->run|
|000024d0| 45 6e 64 20 2d 20 69 6e | 66 6f 2d 3e 72 75 6e 53 |End - in|fo->runS|
|000024e0| 74 61 72 74 3b 0d 09 09 | 73 6f 75 70 2e 73 6f 75 |tart;...|soup.sou|
|000024f0| 70 44 61 74 61 53 69 7a | 65 20 3d 20 47 65 74 48 |pDataSiz|e = GetH|
|00002500| 61 6e 64 6c 65 53 69 7a | 65 28 68 53 74 79 6c 65 |andleSiz|e(hStyle|
|00002510| 72 44 61 74 61 29 3b 0d | 0d 09 09 2f 2f 20 6d 6f |rData);.|...// mo|
|00002520| 76 65 20 69 74 20 74 6f | 20 74 68 65 20 73 6f 75 |ve it to| the sou|
|00002530| 70 20 68 61 6e 64 6c 65 | 0d 09 09 69 66 20 28 28 |p handle|...if ((|
|00002540| 65 72 72 20 3d 20 5f 57 | 45 41 6c 6c 6f 63 61 74 |err = _W|EAllocat|
|00002550| 65 28 73 69 7a 65 6f 66 | 28 73 6f 75 70 29 2c 20 |e(sizeof|(soup), |
|00002560| 6b 41 6c 6c 6f 63 54 65 | 6d 70 2c 20 68 53 74 79 |kAllocTe|mp, hSty|
|00002570| 6c 65 72 53 6f 75 70 29 | 29 20 21 3d 20 6e 6f 45 |lerSoup)|) != noE|
|00002580| 72 72 29 0d 09 09 7b 0d | 09 09 09 67 6f 74 6f 20 |rr)...{.|...goto |
|00002590| 63 6c 65 61 6e 75 70 3b | 0d 09 09 7d 0d 0d 09 09 |cleanup;|...}....|
|000025a0| 42 6c 6f 63 6b 4d 6f 76 | 65 44 61 74 61 28 26 73 |BlockMov|eData(&s|
|000025b0| 6f 75 70 2c 20 2a 2a 68 | 53 74 79 6c 65 72 53 6f |oup, **h|StylerSo|
|000025c0| 75 70 2c 20 73 69 7a 65 | 6f 66 28 73 6f 75 70 29 |up, size|of(soup)|
|000025d0| 29 3b 0d 0d 09 09 2f 2f | 20 61 70 70 65 6e 64 20 |);....//| append |
|000025e0| 74 68 65 20 61 63 74 75 | 61 6c 20 73 74 79 6c 65 |the actu|al style|
|000025f0| 72 20 64 61 74 61 20 74 | 6f 20 74 68 65 20 73 6f |r data t|o the so|
|00002600| 75 70 20 68 61 6e 64 6c | 65 0d 09 09 7b 0d 09 09 |up handl|e...{...|
|00002610| 09 42 6f 6f 6c 65 61 6e | 20 73 61 76 65 44 61 74 |.Boolean| saveDat|
|00002620| 61 4c 6f 63 6b 20 3d 20 | 5f 57 45 53 65 74 48 61 |aLock = |_WESetHa|
|00002630| 6e 64 6c 65 4c 6f 63 6b | 28 68 53 74 79 6c 65 72 |ndleLock|(hStyler|
|00002640| 44 61 74 61 2c 20 74 72 | 75 65 29 3b 0d 09 09 09 |Data, tr|ue);....|
|00002650| 65 72 72 20 3d 20 5f 57 | 45 53 70 6c 69 63 65 28 |err = _W|ESplice(|
|00002660| 2a 68 53 74 79 6c 65 72 | 53 6f 75 70 2c 20 2a 68 |*hStyler|Soup, *h|
|00002670| 53 74 79 6c 65 72 44 61 | 74 61 2c 20 73 6f 75 70 |StylerDa|ta, soup|
|00002680| 2e 73 6f 75 70 44 61 74 | 61 53 69 7a 65 2c 20 2d |.soupDat|aSize, -|
|00002690| 31 29 3b 0d 09 09 09 5f | 57 45 53 65 74 48 61 6e |1);...._|WESetHan|
|000026a0| 64 6c 65 4c 6f 63 6b 28 | 68 53 74 79 6c 65 72 44 |dleLock(|hStylerD|
|000026b0| 61 74 61 2c 20 73 61 76 | 65 44 61 74 61 4c 6f 63 |ata, sav|eDataLoc|
|000026c0| 6b 29 3b 0d 09 09 7d 0d | 09 7d 20 2f 2f 20 69 66 |k);...}.|.} // if|
|000026d0| 20 73 74 79 6c 65 72 20 | 72 65 66 65 72 65 6e 63 | styler |referenc|
|000026e0| 65 20 69 73 20 6e 6f 74 | 20 6e 69 6c 0d 0d 63 6c |e is not| nil..cl|
|000026f0| 65 61 6e 75 70 3a 0d 09 | 69 66 20 28 64 69 73 70 |eanup:..|if (disp|
|00002700| 6f 73 65 44 61 74 61 29 | 0d 09 7b 0d 09 09 5f 57 |oseData)|..{..._W|
|00002710| 45 46 6f 72 67 65 74 48 | 61 6e 64 6c 65 28 26 68 |EForgetH|andle(&h|
|00002720| 53 74 79 6c 65 72 44 61 | 74 61 29 3b 0d 09 7d 0d |StylerDa|ta);..}.|
|00002730| 0d 09 72 65 74 75 72 6e | 20 65 72 72 3b 0d 7d 0d |..return| err;.}.|
|00002740| 0d 70 61 73 63 61 6c 20 | 4f 53 45 72 72 20 5f 57 |.pascal |OSErr _W|
|00002750| 45 47 65 74 53 74 79 6c | 65 72 45 6e 74 72 79 28 |EGetStyl|erEntry(|
|00002760| 46 6c 61 76 6f 72 54 79 | 70 65 20 73 74 79 6c 65 |FlavorTy|pe style|
|00002770| 72 54 79 70 65 2c 20 53 | 49 6e 74 33 32 20 2a 69 |rType, S|Int32 *i|
|00002780| 6e 64 65 78 29 0d 7b 0d | 09 4f 53 45 72 72 20 65 |ndex).{.|.OSErr e|
|00002790| 72 72 20 3d 20 6e 6f 45 | 72 72 3b 0d 0d 09 2a 69 |rr = noE|rr;...*i|
|000027a0| 6e 64 65 78 20 3d 20 6b | 55 6e 6b 6e 6f 77 6e 4f |ndex = k|UnknownO|
|000027b0| 62 6a 65 63 74 54 79 70 | 65 3b 0d 0d 09 2f 2f 20 |bjectTyp|e;...// |
|000027c0| 63 72 65 61 74 65 20 74 | 68 65 20 68 61 6e 64 6c |create t|he handl|
|000027d0| 65 72 20 74 61 62 6c 65 | 2c 20 69 66 20 69 74 20 |er table|, if it |
|000027e0| 64 6f 65 73 6e 27 74 20 | 65 78 69 73 74 0d 09 69 |doesn't |exist..i|
|000027f0| 66 20 28 5f 77 65 53 74 | 79 6c 65 72 48 61 6e 64 |f (_weSt|ylerHand|
|00002800| 6c 65 72 54 61 62 6c 65 | 20 3d 3d 20 6e 69 6c 29 |lerTable| == nil)|
|00002810| 0d 09 7b 0d 09 09 5f 77 | 65 53 74 79 6c 65 72 48 |..{..._w|eStylerH|
|00002820| 61 6e 64 6c 65 72 54 61 | 62 6c 65 20 3d 20 28 57 |andlerTa|ble = (W|
|00002830| 45 53 74 79 6c 65 72 48 | 61 6e 64 6c 65 72 54 61 |EStylerH|andlerTa|
|00002840| 62 6c 65 29 20 4e 65 77 | 48 61 6e 64 6c 65 28 30 |ble) New|Handle(0|
|00002850| 29 3b 0d 09 09 69 66 20 | 28 28 65 72 72 20 3d 20 |);...if |((err = |
|00002860| 4d 65 6d 45 72 72 6f 72 | 28 29 29 20 21 3d 20 6e |MemError|()) != n|
|00002870| 6f 45 72 72 29 0d 09 09 | 7b 0d 09 09 09 72 65 74 |oErr)...|{....ret|
|00002880| 75 72 6e 20 65 72 72 3b | 0d 09 09 7d 0d 09 7d 0d |urn err;|...}..}.|
|00002890| 0d 09 2f 2f 20 6c 6f 6f | 6b 20 66 6f 72 20 74 68 |..// loo|k for th|
|000028a0| 65 20 65 6e 74 72 79 20 | 63 6f 72 72 65 73 70 6f |e entry |correspo|
|000028b0| 6e 64 69 6e 67 20 74 6f | 20 74 68 65 20 73 70 65 |nding to| the spe|
|000028c0| 63 69 66 69 65 64 20 73 | 74 79 6c 65 72 20 74 79 |cified s|tyler ty|
|000028d0| 70 65 0d 09 69 66 20 28 | 28 2a 69 6e 64 65 78 20 |pe..if (|(*index |
|000028e0| 3d 20 5f 57 45 4c 6f 6f | 6b 75 70 53 74 79 6c 65 |= _WELoo|kupStyle|
|000028f0| 72 54 79 70 65 28 73 74 | 79 6c 65 72 54 79 70 65 |rType(st|ylerType|
|00002900| 29 29 20 3d 3d 20 6b 55 | 6e 6b 6e 6f 77 6e 4f 62 |)) == kU|nknownOb|
|00002910| 6a 65 63 74 54 79 70 65 | 29 0d 09 7b 0d 09 09 57 |jectType|)..{...W|
|00002920| 45 53 74 79 6c 65 72 48 | 61 6e 64 6c 65 72 45 6e |EStylerH|andlerEn|
|00002930| 74 72 79 20 65 6e 74 72 | 79 3b 0d 09 09 42 4c 4f |try entr|y;...BLO|
|00002940| 43 4b 5f 43 4c 52 28 65 | 6e 74 72 79 29 3b 0d 09 |CK_CLR(e|ntry);..|
|00002950| 09 65 6e 74 72 79 2e 73 | 74 79 6c 65 72 54 79 70 |.entry.s|tylerTyp|
|00002960| 65 20 3d 20 73 74 79 6c | 65 72 54 79 70 65 3b 0d |e = styl|erType;.|
|00002970| 0d 09 09 2f 2f 20 70 72 | 65 76 69 6f 75 73 6c 79 |...// pr|eviously|
|00002980| 20 75 6e 6b 6e 6f 77 6e | 20 73 74 79 6c 65 72 20 | unknown| styler |
|00002990| 74 79 70 65 3a 20 61 70 | 70 65 6e 64 20 61 20 6e |type: ap|pend a n|
|000029a0| 65 77 20 65 6e 74 72 79 | 20 61 74 20 74 68 65 20 |ew entry| at the |
|000029b0| 65 6e 64 20 6f 66 20 74 | 68 65 20 68 61 6e 64 6c |end of t|he handl|
|000029c0| 65 72 20 74 61 62 6c 65 | 0d 09 09 2a 69 6e 64 65 |er table|...*inde|
|000029d0| 78 20 3d 20 47 65 74 48 | 61 6e 64 6c 65 53 69 7a |x = GetH|andleSiz|
|000029e0| 65 28 28 48 61 6e 64 6c | 65 29 20 5f 77 65 53 74 |e((Handl|e) _weSt|
|000029f0| 79 6c 65 72 48 61 6e 64 | 6c 65 72 54 61 62 6c 65 |ylerHand|lerTable|
|00002a00| 29 20 2f 20 73 69 7a 65 | 6f 66 28 57 45 53 74 79 |) / size|of(WESty|
|00002a10| 6c 65 72 48 61 6e 64 6c | 65 72 45 6e 74 72 79 29 |lerHandl|erEntry)|
|00002a20| 3b 0d 09 09 65 72 72 20 | 3d 20 5f 57 45 53 70 6c |;...err |= _WESpl|
|00002a30| 69 63 65 28 28 48 61 6e | 64 6c 65 29 20 5f 77 65 |ice((Han|dle) _we|
|00002a40| 53 74 79 6c 65 72 48 61 | 6e 64 6c 65 72 54 61 62 |StylerHa|ndlerTab|
|00002a50| 6c 65 2c 20 26 65 6e 74 | 72 79 2c 20 73 69 7a 65 |le, &ent|ry, size|
|00002a60| 6f 66 28 65 6e 74 72 79 | 29 2c 20 2d 31 29 3b 0d |of(entry|), -1);.|
|00002a70| 09 7d 0d 0d 09 72 65 74 | 75 72 6e 20 65 72 72 3b |.}...ret|urn err;|
|00002a80| 0d 7d 0d 0d 70 61 73 63 | 61 6c 20 4f 53 45 72 72 |.}..pasc|al OSErr|
|00002a90| 20 57 45 49 6e 73 74 61 | 6c 6c 53 74 79 6c 65 72 | WEInsta|llStyler|
|00002aa0| 4e 65 77 50 72 6f 63 28 | 46 6c 61 76 6f 72 54 79 |NewProc(|FlavorTy|
|00002ab0| 70 65 20 73 74 79 6c 65 | 72 54 79 70 65 2c 20 57 |pe style|rType, W|
|00002ac0| 45 53 74 79 6c 65 72 4e | 65 77 55 50 50 20 73 74 |EStylerN|ewUPP st|
|00002ad0| 79 6c 65 72 4e 65 77 29 | 0d 7b 0d 09 4f 53 45 72 |ylerNew)|.{..OSEr|
|00002ae0| 72 20 65 72 72 3b 0d 09 | 53 49 6e 74 33 32 20 69 |r err;..|SInt32 i|
|00002af0| 6e 64 65 78 3b 0d 0d 09 | 65 72 72 20 3d 20 5f 57 |ndex;...|err = _W|
|00002b00| 45 47 65 74 53 74 79 6c | 65 72 45 6e 74 72 79 28 |EGetStyl|erEntry(|
|00002b10| 73 74 79 6c 65 72 54 79 | 70 65 2c 20 26 69 6e 64 |stylerTy|pe, &ind|
|00002b20| 65 78 29 3b 0d 09 69 66 | 20 28 65 72 72 20 3d 3d |ex);..if| (err ==|
|00002b30| 20 6e 6f 45 72 72 29 0d | 09 7b 0d 09 09 28 2a 5f | noErr).|.{...(*_|
|00002b40| 77 65 53 74 79 6c 65 72 | 48 61 6e 64 6c 65 72 54 |weStyler|HandlerT|
|00002b50| 61 62 6c 65 29 5b 69 6e | 64 65 78 5d 2e 73 74 79 |able)[in|dex].sty|
|00002b60| 6c 65 72 4e 65 77 20 3d | 20 73 74 79 6c 65 72 4e |lerNew =| stylerN|
|00002b70| 65 77 3b 0d 09 7d 0d 0d | 09 72 65 74 75 72 6e 20 |ew;..}..|.return |
|00002b80| 65 72 72 3b 0d 7d 0d 0d | 70 61 73 63 61 6c 20 4f |err;.}..|pascal O|
|00002b90| 53 45 72 72 20 57 45 49 | 6e 73 74 61 6c 6c 53 74 |SErr WEI|nstallSt|
|00002ba0| 79 6c 65 72 43 6f 6d 70 | 75 74 65 50 72 6f 63 28 |ylerComp|uteProc(|
|00002bb0| 46 6c 61 76 6f 72 54 79 | 70 65 20 73 74 79 6c 65 |FlavorTy|pe style|
|00002bc0| 72 54 79 70 65 2c 20 57 | 45 53 74 79 6c 65 72 43 |rType, W|EStylerC|
|00002bd0| 6f 6d 70 75 74 65 55 50 | 50 20 73 74 79 6c 65 72 |omputeUP|P styler|
|00002be0| 43 6f 6d 70 75 74 65 29 | 0d 7b 0d 09 4f 53 45 72 |Compute)|.{..OSEr|
|00002bf0| 72 20 65 72 72 3b 0d 09 | 53 49 6e 74 33 32 20 69 |r err;..|SInt32 i|
|00002c00| 6e 64 65 78 3b 0d 0d 09 | 65 72 72 20 3d 20 5f 57 |ndex;...|err = _W|
|00002c10| 45 47 65 74 53 74 79 6c | 65 72 45 6e 74 72 79 28 |EGetStyl|erEntry(|
|00002c20| 73 74 79 6c 65 72 54 79 | 70 65 2c 20 26 69 6e 64 |stylerTy|pe, &ind|
|00002c30| 65 78 29 3b 0d 09 69 66 | 20 28 65 72 72 20 3d 3d |ex);..if| (err ==|
|00002c40| 20 6e 6f 45 72 72 29 0d | 09 7b 0d 09 09 28 2a 5f | noErr).|.{...(*_|
|00002c50| 77 65 53 74 79 6c 65 72 | 48 61 6e 64 6c 65 72 54 |weStyler|HandlerT|
|00002c60| 61 62 6c 65 29 5b 69 6e | 64 65 78 5d 2e 73 74 79 |able)[in|dex].sty|
|00002c70| 6c 65 72 43 6f 6d 70 75 | 74 65 20 3d 20 73 74 79 |lerCompu|te = sty|
|00002c80| 6c 65 72 43 6f 6d 70 75 | 74 65 3b 0d 09 7d 0d 0d |lerCompu|te;..}..|
|00002c90| 09 72 65 74 75 72 6e 20 | 65 72 72 3b 0d 7d 0d 0d |.return |err;.}..|
|00002ca0| 70 61 73 63 61 6c 20 4f | 53 45 72 72 20 57 45 49 |pascal O|SErr WEI|
|00002cb0| 6e 73 74 61 6c 6c 53 74 | 79 6c 65 72 44 72 61 77 |nstallSt|ylerDraw|
|00002cc0| 50 72 6f 63 28 46 6c 61 | 76 6f 72 54 79 70 65 20 |Proc(Fla|vorType |
|00002cd0| 73 74 79 6c 65 72 54 79 | 70 65 2c 20 57 45 53 74 |stylerTy|pe, WESt|
|00002ce0| 79 6c 65 72 44 72 61 77 | 55 50 50 20 73 74 79 6c |ylerDraw|UPP styl|
|00002cf0| 65 72 44 72 61 77 29 0d | 7b 0d 09 4f 53 45 72 72 |erDraw).|{..OSErr|
|00002d00| 20 65 72 72 3b 0d 09 53 | 49 6e 74 33 32 20 69 6e | err;..S|Int32 in|
|00002d10| 64 65 78 3b 0d 0d 09 65 | 72 72 20 3d 20 5f 57 45 |dex;...e|rr = _WE|
|00002d20| 47 65 74 53 74 79 6c 65 | 72 45 6e 74 72 79 28 73 |GetStyle|rEntry(s|
|00002d30| 74 79 6c 65 72 54 79 70 | 65 2c 20 26 69 6e 64 65 |tylerTyp|e, &inde|
|00002d40| 78 29 3b 0d 09 69 66 20 | 28 65 72 72 20 3d 3d 20 |x);..if |(err == |
|00002d50| 6e 6f 45 72 72 29 0d 09 | 7b 0d 09 09 28 2a 5f 77 |noErr)..|{...(*_w|
|00002d60| 65 53 74 79 6c 65 72 48 | 61 6e 64 6c 65 72 54 61 |eStylerH|andlerTa|
|00002d70| 62 6c 65 29 5b 69 6e 64 | 65 78 5d 2e 73 74 79 6c |ble)[ind|ex].styl|
|00002d80| 65 72 44 72 61 77 20 3d | 20 73 74 79 6c 65 72 44 |erDraw =| stylerD|
|00002d90| 72 61 77 3b 0d 09 7d 0d | 0d 09 72 65 74 75 72 6e |raw;..}.|..return|
|00002da0| 20 65 72 72 3b 0d 7d 0d | 0d 70 61 73 63 61 6c 20 | err;.}.|.pascal |
|00002db0| 4f 53 45 72 72 20 57 45 | 49 6e 73 74 61 6c 6c 53 |OSErr WE|InstallS|
|00002dc0| 74 79 6c 65 72 43 6c 69 | 63 6b 50 72 6f 63 28 46 |tylerCli|ckProc(F|
|00002dd0| 6c 61 76 6f 72 54 79 70 | 65 20 73 74 79 6c 65 72 |lavorTyp|e styler|
|00002de0| 54 79 70 65 2c 20 57 45 | 53 74 79 6c 65 72 43 6c |Type, WE|StylerCl|
|00002df0| 69 63 6b 55 50 50 20 73 | 74 79 6c 65 72 43 6c 69 |ickUPP s|tylerCli|
|00002e00| 63 6b 29 0d 7b 0d 09 4f | 53 45 72 72 20 65 72 72 |ck).{..O|SErr err|
|00002e10| 3b 0d 09 53 49 6e 74 33 | 32 20 69 6e 64 65 78 3b |;..SInt3|2 index;|
|00002e20| 0d 0d 09 65 72 72 20 3d | 20 5f 57 45 47 65 74 53 |...err =| _WEGetS|
|00002e30| 74 79 6c 65 72 45 6e 74 | 72 79 28 73 74 79 6c 65 |tylerEnt|ry(style|
|00002e40| 72 54 79 70 65 2c 20 26 | 69 6e 64 65 78 29 3b 0d |rType, &|index);.|
|00002e50| 09 69 66 20 28 65 72 72 | 20 3d 3d 20 6e 6f 45 72 |.if (err| == noEr|
|00002e60| 72 29 0d 09 7b 0d 09 09 | 28 2a 5f 77 65 53 74 79 |r)..{...|(*_weSty|
|00002e70| 6c 65 72 48 61 6e 64 6c | 65 72 54 61 62 6c 65 29 |lerHandl|erTable)|
|00002e80| 5b 69 6e 64 65 78 5d 2e | 73 74 79 6c 65 72 43 6c |[index].|stylerCl|
|00002e90| 69 63 6b 20 3d 20 73 74 | 79 6c 65 72 43 6c 69 63 |ick = st|ylerClic|
|00002ea0| 6b 3b 0d 09 7d 0d 0d 09 | 72 65 74 75 72 6e 20 65 |k;..}...|return e|
|00002eb0| 72 72 3b 0d 7d 0d 0d 70 | 61 73 63 61 6c 20 4f 53 |rr;.}..p|ascal OS|
|00002ec0| 45 72 72 20 57 45 49 6e | 73 74 61 6c 6c 53 74 79 |Err WEIn|stallSty|
|00002ed0| 6c 65 72 53 74 72 65 61 | 6d 50 72 6f 63 28 46 6c |lerStrea|mProc(Fl|
|00002ee0| 61 76 6f 72 54 79 70 65 | 20 73 74 79 6c 65 72 54 |avorType| stylerT|
|00002ef0| 79 70 65 2c 20 57 45 53 | 74 79 6c 65 72 53 74 72 |ype, WES|tylerStr|
|00002f00| 65 61 6d 55 50 50 20 73 | 74 79 6c 65 72 53 74 72 |eamUPP s|tylerStr|
|00002f10| 65 61 6d 29 0d 7b 0d 09 | 4f 53 45 72 72 20 65 72 |eam).{..|OSErr er|
|00002f20| 72 3b 0d 09 53 49 6e 74 | 33 32 20 69 6e 64 65 78 |r;..SInt|32 index|
|00002f30| 3b 0d 0d 09 65 72 72 20 | 3d 20 5f 57 45 47 65 74 |;...err |= _WEGet|
|00002f40| 53 74 79 6c 65 72 45 6e | 74 72 79 28 73 74 79 6c |StylerEn|try(styl|
|00002f50| 65 72 54 79 70 65 2c 20 | 26 69 6e 64 65 78 29 3b |erType, |&index);|
|00002f60| 0d 09 69 66 20 28 65 72 | 72 20 3d 3d 20 6e 6f 45 |..if (er|r == noE|
|00002f70| 72 72 29 0d 09 7b 0d 09 | 09 28 2a 5f 77 65 53 74 |rr)..{..|.(*_weSt|
|00002f80| 79 6c 65 72 48 61 6e 64 | 6c 65 72 54 61 62 6c 65 |ylerHand|lerTable|
|00002f90| 29 5b 69 6e 64 65 78 5d | 2e 73 74 79 6c 65 72 53 |)[index]|.stylerS|
|00002fa0| 74 72 65 61 6d 20 3d 20 | 73 74 79 6c 65 72 53 74 |tream = |stylerSt|
|00002fb0| 72 65 61 6d 3b 0d 09 7d | 0d 0d 09 72 65 74 75 72 |ream;..}|...retur|
|00002fc0| 6e 20 65 72 72 3b 0d 7d | 0d 0d 70 61 73 63 61 6c |n err;.}|..pascal|
|00002fd0| 20 4f 53 45 72 72 20 57 | 45 49 6e 73 74 61 6c 6c | OSErr W|EInstall|
|00002fe0| 53 74 79 6c 65 72 44 69 | 73 70 6f 73 65 50 72 6f |StylerDi|sposePro|
|00002ff0| 63 28 46 6c 61 76 6f 72 | 54 79 70 65 20 73 74 79 |c(Flavor|Type sty|
|00003000| 6c 65 72 54 79 70 65 2c | 20 57 45 53 74 79 6c 65 |lerType,| WEStyle|
|00003010| 72 44 69 73 70 6f 73 65 | 55 50 50 20 73 74 79 6c |rDispose|UPP styl|
|00003020| 65 72 44 69 73 70 6f 73 | 65 29 0d 7b 0d 09 4f 53 |erDispos|e).{..OS|
|00003030| 45 72 72 20 65 72 72 3b | 0d 09 53 49 6e 74 33 32 |Err err;|..SInt32|
|00003040| 20 69 6e 64 65 78 3b 0d | 0d 09 65 72 72 20 3d 20 | index;.|..err = |
|00003050| 5f 57 45 47 65 74 53 74 | 79 6c 65 72 45 6e 74 72 |_WEGetSt|ylerEntr|
|00003060| 79 28 73 74 79 6c 65 72 | 54 79 70 65 2c 20 26 69 |y(styler|Type, &i|
|00003070| 6e 64 65 78 29 3b 0d 09 | 69 66 20 28 65 72 72 20 |ndex);..|if (err |
|00003080| 3d 3d 20 6e 6f 45 72 72 | 29 0d 09 7b 0d 09 09 28 |== noErr|)..{...(|
|00003090| 2a 5f 77 65 53 74 79 6c | 65 72 48 61 6e 64 6c 65 |*_weStyl|erHandle|
|000030a0| 72 54 61 62 6c 65 29 5b | 69 6e 64 65 78 5d 2e 73 |rTable)[|index].s|
|000030b0| 74 79 6c 65 72 44 69 73 | 70 6f 73 65 20 3d 20 73 |tylerDis|pose = s|
|000030c0| 74 79 6c 65 72 44 69 73 | 70 6f 73 65 3b 0d 09 7d |tylerDis|pose;..}|
|000030d0| 0d 0d 09 72 65 74 75 72 | 6e 20 65 72 72 3b 0d 7d |...retur|n err;.}|
|000030e0| 0d 0d 70 61 73 63 61 6c | 20 4f 53 45 72 72 20 57 |..pascal| OSErr W|
|000030f0| 45 53 65 74 53 74 79 6c | 65 72 28 57 45 53 74 79 |ESetStyl|er(WESty|
|00003100| 6c 65 72 52 65 66 65 72 | 65 6e 63 65 20 73 74 79 |lerRefer|ence sty|
|00003110| 6c 65 72 2c 20 57 45 48 | 61 6e 64 6c 65 20 68 57 |ler, WEH|andle hW|
|00003120| 45 29 0d 7b 0d 09 57 45 | 53 74 79 6c 65 4d 6f 64 |E).{..WE|StyleMod|
|00003130| 65 20 6d 6f 64 65 3b 0d | 09 57 45 54 65 78 74 53 |e mode;.|.WETextS|
|00003140| 74 79 6c 65 20 74 73 3b | 0d 0d 09 6d 6f 64 65 20 |tyle ts;|...mode |
|00003150| 3d 20 77 65 44 6f 53 74 | 79 6c 65 72 3b 0d 09 42 |= weDoSt|yler;..B|
|00003160| 4c 4f 43 4b 5f 43 4c 52 | 28 74 73 29 3b 0d 09 74 |LOCK_CLR|(ts);..t|
|00003170| 73 2e 74 73 53 74 79 6c | 65 72 20 3d 20 73 74 79 |s.tsStyl|er = sty|
|00003180| 6c 65 72 3b 0d 09 0d 09 | 69 66 20 28 73 74 79 6c |ler;....|if (styl|
|00003190| 65 72 20 26 26 20 28 5f | 77 65 53 74 79 6c 65 72 |er && (_|weStyler|
|000031a0| 48 61 6e 64 6c 65 72 54 | 61 62 6c 65 20 21 3d 20 |HandlerT|able != |
|000031b0| 6e 69 6c 29 29 0d 09 7b | 0d 09 09 57 45 53 74 79 |nil))..{|...WESty|
|000031c0| 6c 65 72 43 6f 6d 70 75 | 74 65 55 50 50 20 73 74 |lerCompu|teUPP st|
|000031d0| 79 6c 65 72 43 6f 6d 70 | 75 74 65 20 3d 20 28 2a |ylerComp|ute = (*|
|000031e0| 5f 77 65 53 74 79 6c 65 | 72 48 61 6e 64 6c 65 72 |_weStyle|rHandler|
|000031f0| 54 61 62 6c 65 29 5b 28 | 2a 73 74 79 6c 65 72 29 |Table)[(|*styler)|
|00003200| 2d 3e 73 74 79 6c 65 72 | 49 6e 64 65 78 5d 2e 73 |->styler|Index].s|
|00003210| 74 79 6c 65 72 43 6f 6d | 70 75 74 65 3b 0d 09 09 |tylerCom|pute;...|
|00003220| 69 66 20 28 73 74 79 6c | 65 72 43 6f 6d 70 75 74 |if (styl|erComput|
|00003230| 65 20 21 3d 20 6e 69 6c | 29 0d 09 09 7b 0d 09 09 |e != nil|)...{...|
|00003240| 09 43 61 6c 6c 57 45 53 | 74 79 6c 65 72 43 6f 6d |.CallWES|tylerCom|
|00003250| 70 75 74 65 50 72 6f 63 | 28 26 6d 6f 64 65 2c 20 |puteProc|(&mode, |
|00003260| 28 54 65 78 74 53 74 79 | 6c 65 20 2a 29 26 74 73 |(TextSty|le *)&ts|
|00003270| 2c 20 73 74 79 6c 65 72 | 2c 20 73 74 79 6c 65 72 |, styler|, styler|
|00003280| 43 6f 6d 70 75 74 65 29 | 3b 0d 09 09 7d 0d 09 7d |Compute)|;...}..}|
|00003290| 0d 0d 09 72 65 74 75 72 | 6e 20 57 45 53 65 74 53 |...retur|n WESetS|
|000032a0| 74 79 6c 65 28 6d 6f 64 | 65 2c 20 28 54 65 78 74 |tyle(mod|e, (Text|
|000032b0| 53 74 79 6c 65 20 2a 29 | 26 74 73 2c 20 68 57 45 |Style *)|&ts, hWE|
|000032c0| 29 3b 0d 7d 0d 0d 0d 70 | 61 73 63 61 6c 20 4f 53 |);.}...p|ascal OS|
|000032d0| 45 72 72 20 5f 57 45 50 | 72 65 70 65 6e 64 53 74 |Err _WEP|rependSt|
|000032e0| 79 6c 65 72 28 57 45 53 | 6f 75 70 48 61 6e 64 6c |yler(WES|oupHandl|
|000032f0| 65 20 68 53 6f 75 70 2c | 20 63 6f 6e 73 74 20 57 |e hSoup,| const W|
|00003300| 45 52 75 6e 49 6e 66 6f | 50 72 69 76 20 2a 69 6e |ERunInfo|Priv *in|
|00003310| 66 6f 2c 20 53 49 6e 74 | 33 32 20 6f 66 66 73 65 |fo, SInt|32 offse|
|00003320| 74 44 65 6c 74 61 29 0d | 7b 0d 09 2f 2f 20 69 66 |tDelta).|{..// if|
|00003330| 20 69 6e 66 6f 20 64 65 | 73 63 72 69 62 65 73 20 | info de|scribes |
|00003340| 61 6e 20 65 6d 62 65 64 | 64 65 64 20 73 74 79 6c |an embed|ded styl|
|00003350| 65 72 2c 20 70 72 65 70 | 65 6e 64 20 61 20 6e 65 |er, prep|end a ne|
|00003360| 77 20 73 74 79 6c 65 72 | 20 64 65 73 63 72 69 70 |w styler| descrip|
|00003370| 74 6f 72 2c 0d 09 2f 2f | 20 63 6f 6d 70 6c 65 74 |tor,..//| complet|
|00003380| 65 20 77 69 74 68 20 74 | 68 65 20 61 73 73 6f 63 |e with t|he assoc|
|00003390| 69 61 74 65 64 20 73 74 | 79 6c 65 72 20 64 61 74 |iated st|yler dat|
|000033a0| 61 2c 20 74 6f 20 74 68 | 65 20 73 70 65 63 69 66 |a, to th|e specif|
|000033b0| 69 65 64 20 73 6f 75 70 | 2e 0d 09 2f 2f 20 69 6e |ied soup|...// in|
|000033c0| 20 61 6e 79 20 63 61 73 | 65 2c 20 61 64 76 61 6e | any cas|e, advan|
|000033d0| 63 65 20 61 6c 6c 20 63 | 68 61 72 61 63 74 65 72 |ce all c|haracter|
|000033e0| 20 6f 66 66 73 65 74 73 | 20 69 6e 20 74 68 65 20 | offsets| in the |
|000033f0| 73 6f 75 70 20 62 79 20 | 6f 66 66 73 65 74 44 65 |soup by |offsetDe|
|00003400| 6c 74 61 0d 0d 09 57 45 | 53 6f 75 70 48 61 6e 64 |lta...WE|SoupHand|
|00003410| 6c 65 20 68 53 74 79 6c | 65 72 53 6f 75 70 20 3d |le hStyl|erSoup =|
|00003420| 20 6e 69 6c 3b 0d 09 4f | 53 45 72 72 20 65 72 72 | nil;..O|SErr err|
|00003430| 3b 0d 0d 09 65 72 72 20 | 3d 20 5f 57 45 53 6f 75 |;...err |= _WESou|
|00003440| 70 53 74 79 6c 65 72 28 | 26 68 53 74 79 6c 65 72 |pStyler(|&hStyler|
|00003450| 53 6f 75 70 2c 20 69 6e | 66 6f 2c 20 30 29 3b 0d |Soup, in|fo, 0);.|
|00003460| 09 69 66 20 28 65 72 72 | 20 21 3d 20 6e 6f 45 72 |.if (err| != noEr|
|00003470| 72 29 0d 09 09 67 6f 74 | 6f 20 63 6c 65 61 6e 75 |r)...got|o cleanu|
|00003480| 70 3b 0d 0d 09 65 72 72 | 20 3d 20 5f 57 45 50 72 |p;...err| = _WEPr|
|00003490| 65 70 65 6e 64 53 6f 75 | 70 28 68 53 6f 75 70 2c |ependSou|p(hSoup,|
|000034a0| 20 68 53 74 79 6c 65 72 | 53 6f 75 70 2c 20 6f 66 | hStyler|Soup, of|
|000034b0| 66 73 65 74 44 65 6c 74 | 61 29 3b 0d 0d 63 6c 65 |fsetDelt|a);..cle|
|000034c0| 61 6e 75 70 3a 0d 09 5f | 57 45 46 6f 72 67 65 74 |anup:.._|WEForget|
|000034d0| 48 61 6e 64 6c 65 28 26 | 68 53 74 79 6c 65 72 53 |Handle(&|hStylerS|
|000034e0| 6f 75 70 29 3b 0d 0d 09 | 72 65 74 75 72 6e 20 65 |oup);...|return e|
|000034f0| 72 72 3b 0d 0d 7d 0d 0d | 70 61 73 63 61 6c 20 4f |rr;..}..|pascal O|
|00003500| 53 45 72 72 20 5f 57 45 | 41 70 70 65 6e 64 53 74 |SErr _WE|AppendSt|
|00003510| 79 6c 65 72 28 57 45 53 | 6f 75 70 48 61 6e 64 6c |yler(WES|oupHandl|
|00003520| 65 20 68 53 6f 75 70 2c | 20 63 6f 6e 73 74 20 57 |e hSoup,| const W|
|00003530| 45 52 75 6e 49 6e 66 6f | 50 72 69 76 20 2a 69 6e |ERunInfo|Priv *in|
|00003540| 66 6f 2c 20 53 49 6e 74 | 33 32 20 6f 66 66 73 65 |fo, SInt|32 offse|
|00003550| 74 29 0d 7b 0d 09 2f 2f | 20 69 66 20 69 6e 66 6f |t).{..//| if info|
|00003560| 20 64 65 73 63 72 69 62 | 65 73 20 61 6e 20 65 6d | describ|es an em|
|00003570| 62 65 64 64 65 64 20 73 | 74 79 6c 65 72 2c 20 61 |bedded s|tyler, a|
|00003580| 70 70 65 6e 64 20 61 20 | 6e 65 77 20 73 74 79 6c |ppend a |new styl|
|00003590| 65 72 20 64 65 73 63 72 | 69 70 74 6f 72 2c 0d 09 |er descr|iptor,..|
|000035a0| 2f 2f 20 63 6f 6d 70 6c | 65 74 65 20 77 69 74 68 |// compl|ete with|
|000035b0| 20 74 68 65 20 61 73 73 | 6f 63 69 61 74 65 64 20 | the ass|ociated |
|000035c0| 73 74 79 6c 65 72 20 64 | 61 74 61 2c 20 74 6f 20 |styler d|ata, to |
|000035d0| 74 68 65 20 73 70 65 63 | 69 66 69 65 64 20 73 6f |the spec|ified so|
|000035e0| 75 70 2e 0d 0d 09 57 45 | 53 6f 75 70 48 61 6e 64 |up....WE|SoupHand|
|000035f0| 6c 65 20 68 53 74 79 6c | 65 72 53 6f 75 70 20 3d |le hStyl|erSoup =|
|00003600| 20 6e 69 6c 3b 0d 09 4f | 53 45 72 72 20 65 72 72 | nil;..O|SErr err|
|00003610| 3b 0d 0d 09 65 72 72 20 | 3d 20 5f 57 45 53 6f 75 |;...err |= _WESou|
|00003620| 70 53 74 79 6c 65 72 28 | 26 68 53 74 79 6c 65 72 |pStyler(|&hStyler|
|00003630| 53 6f 75 70 2c 20 69 6e | 66 6f 2c 20 6f 66 66 73 |Soup, in|fo, offs|
|00003640| 65 74 29 3b 0d 09 69 66 | 20 28 65 72 72 20 21 3d |et);..if| (err !=|
|00003650| 20 6e 6f 45 72 72 29 0d | 09 09 67 6f 74 6f 20 63 | noErr).|..goto c|
|00003660| 6c 65 61 6e 75 70 3b 0d | 0d 09 2f 2f 20 61 70 70 |leanup;.|..// app|
|00003670| 65 6e 64 20 74 68 65 20 | 73 74 79 6c 65 72 20 73 |end the |styler s|
|00003680| 6f 75 70 20 74 6f 20 74 | 68 65 20 73 6f 75 70 20 |oup to t|he soup |
|00003690| 68 61 6e 64 6c 65 0d 09 | 65 72 72 20 3d 20 5f 57 |handle..|err = _W|
|000036a0| 45 41 70 70 65 6e 64 53 | 6f 75 70 28 68 53 6f 75 |EAppendS|oup(hSou|
|000036b0| 70 2c 20 68 53 74 79 6c | 65 72 53 6f 75 70 29 3b |p, hStyl|erSoup);|
|000036c0| 0d 0d 63 6c 65 61 6e 75 | 70 3a 0d 09 5f 57 45 46 |..cleanu|p:.._WEF|
|000036d0| 6f 72 67 65 74 48 61 6e | 64 6c 65 28 26 68 53 74 |orgetHan|dle(&hSt|
|000036e0| 79 6c 65 72 53 6f 75 70 | 29 3b 0d 0d 09 72 65 74 |ylerSoup|);...ret|
|000036f0| 75 72 6e 20 65 72 72 3b | 0d 0d 7d 0d 0d 0d 23 65 |urn err;|..}...#e|
|00003700| 6e 64 69 66 20 20 2f 2f | 20 57 41 53 54 45 5f 53 |ndif //| WASTE_S|
|00003710| 54 59 4c 45 52 53 0d 00 | 00 00 00 00 00 00 00 00 |TYLERS..|........|
|00003720| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003730| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003740| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003750| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003770| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003780| 00 00 01 00 00 00 01 00 | 00 00 00 00 00 00 00 1e |........|........|
|00003790| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000037a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000037b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000037c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000037d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000037e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000037f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003800| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003810| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003820| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003830| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003860| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003870| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003880| 00 00 01 00 00 00 01 00 | 00 00 00 00 00 00 00 1e |........|........|
|00003890| 07 9f d8 34 03 6a 00 00 | 00 1c 00 1e ff ff 00 00 |...4.j..|........|
|000038a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000038b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000038c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000038d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000038e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000038f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+